Part Number Hot Search : 
MBR206 50224 CA0158M 170M2621 20004 PSN0930A SG3842Y C2274
Product Description
Full Text Search
 

To Download 9S12A128DGV1 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  motorola reserves the right to make changes without further notice to any products herein to improve reliability, function or design. motorola does not assume any liability arising out of the application or use of any product or circuit described herein ; neither does it convey any license under its patent rights nor the rights of others. motorola products are not designed, intend ed, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the motorola product could create a situation whe re personal injury or death may occur. should buyer purchase or use motorola products for any such unintended or unauthorized application, buyer shall indemnify and hold motorola and its officers, employees, subsidiaries, affiliates, and distributors ha rmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any clai m of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that motorola was negligent regarding the design or manufacture of the part. 9S12A128DGV1/d 4/2002 1 mc9s12a128 device guide v01.01 original release date: 8 march, 2002 revised: 17 april, 2002 motorola, inc
mc9s12a128 device guide ? v01.01 2 revision history for additional information, refer to the mc9s12a128 8-bit microcontroller unit mask set errata (motorola document order number, 9s12a128mse1). the errata can be found on the world wide web at: http://www.motorola.com/semiconductors/ version number revision date effective date author description of changes v01.00 8 mar 2002 8 mar 2002 initial release v01.01 17 april 2002 12 april 2002 replaced document order number with version except for cover sheet co r r e c t e d t a b l e 1 - 1 d e v i ce m e m o ry m ap en t r i es f o r eeprom array and ram array table a-4 operating conditions ? increased v dd to 2.35v table a-6 5v i/o characteristics ? corrected rating column for v oh and v ol and typical value for c in table a-8 atd operating characteristics ? updated rating definitions for items 6, 7, and 8 for clarity
mc9s12a128 device guide ? v01.01 3 table of contents section 1 introduction 1.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.2 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.3 modes of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 1.4 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18 1.5 device memory map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 1.6 part id assignments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 section 2 signal description 2.1 device pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 2.2 signal properties summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 2.3 detailed signal descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 2.3.1 extal, xtal ? oscillator pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.3.2 reset ? external reset pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 2.3.3 test ? test pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 2.3.4 v regen ? voltage regulator enable pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 2.3.5 xfc ? pll loop filter pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 2.3.6 bkgd / taghi / modc ? background debug, tag high, and mode pin . . . . . . . .29 2.3.7 pad15 / an15 / etrig1 ? port ad input pin of atd1 . . . . . . . . . . . . . . . . . . . . . .29 2.3.8 pad[14:08] / an[14:08] ? port ad input pins of atd1 . . . . . . . . . . . . . . . . . . . . . .29 2.3.9 pad7 / an07 / etrig0 ? port ad input pin of atd0 . . . . . . . . . . . . . . . . . . . . . . .29 2.3.10 pad[06:00] / an[06:00] ? port ad input pins of atd0 . . . . . . . . . . . . . . . . . . . . . .29 2.3.11 pa[7:0] / addr[15:8] / data[15:8] ? port a i/o pins . . . . . . . . . . . . . . . . . . . . . . .29 2.3.12 pb[7:0] / addr[7:0] / data[7:0] ? port b i/o pins . . . . . . . . . . . . . . . . . . . . . . . . .29 2.3.13 pe7 / noacc / xclks ? port e i/o pin 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29 2.3.14 pe6 / modb / ipipe1 ? port e i/o pin 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 2.3.15 pe5 / moda / ipipe0 ? port e i/o pin 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 2.3.16 pe4 / eclk ? port e i/o pin 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 2.3.17 pe3 / lstrb / taglo ? port e i/o pin 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 2.3.18 pe2 / r/w ? port e i/o pin 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 2.3.19 pe1 / irq ? port e input pin 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 2.3.20 pe0 / xirq ? port e input pin 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 2.3.21 ph7 / kwh7 ? port h i/o pin 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
mc9s12a128 device guide ? v01.01 4 2.3.22 ph6 / kwh6 ? port h i/o pin 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31 2.3.23 ph5 / kwh5 ? port h i/o pin 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31 2.3.24 ph4 / kwh4 ? port h i/o pin 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31 2.3.25 ph3 / kwh3 / ss1 ? port h i/o pin 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31 2.3.26 ph2 / kwh2 / sck1 ? port h i/o pin 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.3.27 ph1 / kwh1 / mosi1 ? port h i/o pin 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31 2.3.28 ph0 / kwh0 / miso1 ? port h i/o pin 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31 2.3.29 pj7 / kwj7 / scl ? port j i/o pin 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.3.30 pj6 / kwj6 / sda ? port j i/o pin 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.3.31 pj[1:0] / kwj[1:0] ? port j i/o pins [1:0] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 2.3.32 pk7 / ecs / romon ? port k i/o pin 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 2.3.33 pk[5:0] / xaddr[19:14] ? port k i/o pins [5:0] . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 2.3.34 pm7 ? port m i/o pin 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 2.3.35 pm6 ? port m i/o pin 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 2.3.36 pm5 / sck0 ? port m i/o pin 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 2.3.37 pm4 / mosi0 ? port m i/o pin 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 2.3.38 pm3 / ss0 ? port m i/o pin 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 2.3.39 pm2 / miso0 ? port m i/o pin 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 2.3.40 pm1 ? port m i/o pin 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 2.3.41 pm0 ? port m i/o pin 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 2.3.42 pp7 / kwp7 / pwm7 ? port p i/o pin 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 2.3.43 pp6 / kwp6 / pwm6 ? port p i/o pin 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 2.3.44 pp5 / kwp5 / pwm5 ? port p i/o pin 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 2.3.45 pp4 / kwp4 / pwm4 ? port p i/o pin 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 2.3.46 pp3 / kwp3 / pwm3 / ss1 ? port p i/o pin 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 2.3.47 pp2 / kwp2 / pwm2 / sck1 ? port p i/o pin 2 . . . . . . . . . . . . . . . . . . . . . . . . . . .34 2.3.48 pp1 / kwp1 / pwm1 / mosi1 ? port p i/o pin 1. . . . . . . . . . . . . . . . . . . . . . . . . . .34 2.3.49 pp0 / kwp0 / pwm0 / miso1 ? port p i/o pin 0. . . . . . . . . . . . . . . . . . . . . . . . . . .34 2.3.50 ps7 / ss0 ? port s i/o pin 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34 2.3.51 ps6 / sck0 ? port s i/o pin 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34 2.3.52 ps5 / mosi0 ? port s i/o pin 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34 2.3.53 ps4 / miso0 ? port s i/o pin 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34 2.3.54 ps3 / txd1 ? port s i/o pin 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.3.55 ps2 / rxd1 ? port s i/o pin 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 2.3.56 ps1 / txd0 ? port s i/o pin 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.3.57 ps0 / rxd0 ? port s i/o pin 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
mc9s12a128 device guide ? v01.01 5 2.3.58 pt[7:0] / ioc[7:0] ? port t i/o pins [7:0] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 2.4 power supply pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 2.4.1 v ddx , v ssx ? power & ground pins for i/o drivers . . . . . . . . . . . . . . . . . . . . . . . . .35 2.4.2 v ddr , v ssr ? power & ground pins for i/o drivers & for internal voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 2.4.3 v dd1 , v dd2 , v ss1 , v ss2 ? core power pins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 2.4.4 v dda , v ssa ? power supply pins for atd and vreg . . . . . . . . . . . . . . . . . . . . . . .36 2.4.5 v rh , v rl ? atd reference voltage input pins . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 2.4.6 v ddpll , v sspll ? power supply pins for pll . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 2.4.7 v regen ? on chip voltage regulator enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 section 3 system clock description 3.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 section 4 modes of operation 4.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.2 modes of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41 4.2.1 normal operating modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42 4.2.2 special operating modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 4.2.3 test operating mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 4.3 security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46 4.3.1 securing the microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46 4.3.2 operation of the secured microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46 4.3.3 unsecuring the microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47 4.4 low power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47 section 5 resets and interrupts 5.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 5.2 vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 5.2.1 vector table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 5.3 effects of reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50 5.3.1 i/o pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 5.3.2 memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50 section 6 hcs12 core block description section 7 clock and reset generator (crg) block description
mc9s12a128 device guide ? v01.01 6 7.1 device-specific information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51 7.1.1 xclks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 section 8 enhanced capture timer (ect) block description section 9 analog to digital converter (atd) block description section 10 inter-ic bus (iic) block description section 11 serial communications interface (sci) block description section 12 serial peripheral interface (spi) block description section 13 pulse width modulator (pwm) block description section 14 flash eeprom 128k block description section 15 eeprom 2k block description section 16 ram block description section 17 port integration module (pim) block description section 18 voltage regulator (v reg ) block description appendix a electrical characteristics a.1 general. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57 a.1.1 parameter classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 a.1.2 power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 7 a.1.3 pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 a.1.4 current injection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 a.1.5 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59 a.1.6 esd protection and latch-up immunity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 a.1.7 operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61 a.1.8 power dissipation and thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 a.1.9 i/o characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4 a.1.10 supply currents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 5
mc9s12a128 device guide ? v01.01 7 a.2 atd characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 6 a.2.1 atd operating characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 a.2.2 factors influencing accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 a.2.3 atd accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 a.3 nvm, flash, and eeprom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 a.3.1 nvm timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7 0 a.3.2 nvm reliability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 a.4 voltage regulator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 a.5 reset, oscillator and pll. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74 a.5.1 startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 a.5.2 oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 a.5.3 phase locked loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76 a.6 spi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 a.6.1 master mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8 0 a.6.2 slave mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 a.7 external bus timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83 a.7.1 general muxed bus timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83 appendix b package information b.1 general. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87 b.2 112-pin lqfp package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 b.3 80-pin qfp package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
mc9s12a128 device guide ? v01.01 8
mc9s12a128 device guide ? v01.01 9 list of figures figure 1-1 mc9s12a128 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19 figure 1-2 mc9s12a128 memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 figure 2-1 pin assignments in 112-pin lqfp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24 figure 2-2 pin assignments in 80-pin qfp for mc9s12a128 . . . . . . . . . . . . . . . . . . . . . . .25 figure 2-3 pll loop filter connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 figure 3-1 clock connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39 figure 18-1 recommended pcb layout 112 lqfp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55 figure 18-2 recommended pcb layout for 80 qfp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 figure a-1 atd accuracy definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 figure a-2 basic pll functional diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 figure a-3 jitter definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 figure a-4 maximum bus clock jitter approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 figure a-5 spi master timing (cpha = 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 figure a-6 spi master timing (cpha =1). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 figure a-7 spi slave timing (cpha = 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 figure a-8 spi slave timing (cpha =1). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 figure a-9 general external bus timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 figure b-1 112-pin lqfp mechanical dimensions (case no. 987) . . . . . . . . . . . . . . . . . . 88 figure b-2 80-pin qfp mechanical dimensions (case no. 841b) . . . . . . . . . . . . . . . . . . . 89
mc9s12a128 device guide ? v01.01 10
mc9s12a128 device guide ? v01.01 11 list of tables table 0-1 document references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 table 1-1 device memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 table 1-2 assigned part id numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 table 1-3 memory size registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 table 2-1 signal properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 table 2-2 mc9s12a128 power and ground connection summary . . . . . . . . . . . . . . . . . . .37 table 4-1 mode selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41 table 5-1 interrupt vector locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 table a-1 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59 table a-2 esd and latch-up test conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 table a-3 esd and latch-up protection characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . .60 table a-4 operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61 table a-5 thermal package characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63 table a-6 5v i/o characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 table a-7 supply current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 table a-8 atd operating characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 table a-9 atd electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 table a-10 atd conversion performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 table a-11 nvm timing characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71 table a-12 nvm reliability characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 table a-13 voltage regulator recommended load capacitances . . . . . . . . . . . . . . . . . . . .73 table a-14 startup characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74 table a-15 oscillator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 table a-16 pll characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79 table a-17 spi master mode timing characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81 table a-18 spi slave mode timing characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .82 table a-19 expanded bus timing characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85
mc9s12a128 device guide ? v01.01 12
mc9s12a128 device guide ? v01.01 13 preface the device user guide provides information about the mc9s12a128 device made up of standard hcs12 blocks and the hcs12 processor core. this document is part of the customer documentation. a complete set of device manuals also includes the cpu12 reference manual (motorola order number, cpu12rm/ad) and all the individual block guides of the implemented modules. in a effort to reduce redundancy all module specific information is located only in the respective block guide. if applicable, special implementation details of the module are given in the block description sections of this document. see table 0-1 for names and versions of the referenced documents throughout the device guide. table 0-1 document references user guide version document order number hcs12 core user guide v01 hcs12coreug/d crg block guide v03 s12crgv3/d ect_16b8c block guide v01 s12ect16b8cv1/d atd_10b8c block guide v02 s12atd10b8cv2/d iic block guide v02 s12iicv2/d sci block guide v02 s12sciv2/d spi block guide v02 s12spiv2/d pwm_8b8c block guide v01 s12pwm8b8cv1/d fts128k block guide v02 s12fts128kv1/d eets2k block guide v02 s12eets2kv1/d vreg block guide v01 s12vregv1/d pim_9a128 block guide v01 s12a128pimv1/d
mc9s12a128 device guide ? v01.01 14
mc9s12a128 device guide ? v01.01 15 section 1 introduction 1.1 overview the mc9s12a128 microcontroller unit (mcu) is a 16-bit device composed of standard on-chip peripherals including a 16-bit central processing unit (hcs12 cpu), 128k bytes of flash eeprom, 8k bytes of ram, 2k bytes of eeprom, two asynchronous serial communications interfaces (sci), two serial peripheral interfaces (spi), an 8-channel ic/oc enhanced capture timer, two 8-channel, 10-bit analog-to-digital converters (adc), an 8-channel pulse-width modulator (pwm), 29 discrete digital i/o channels (port a, port b, port k and port e), 20 discrete digital i/o lines with interrupt and wakeup capability and an inter-ic bus. system resource mapping, clock generation, interrupt control and bus interfacing are managed by the system integration module (sim). the mc9s12a128 has full 16-bit data paths throughout. however, the external bus can operate in an 8-bit narrow mode so single 8-bit wide memory can be interfaced for lower cost systems. the inclusion of a pll circuit allows power consumption and performance to be adjusted to suit operational requirements. 1.2 features ? hcs12 core ? 16-bit hcs12 cpu i. upward compatible with m68hc11 instruction set ii. interrupt stacking and programmer?s model identical to m68hc11 iii. instruction queue iv. enhanced indexed addressing ? mebi (multiplexed external bus interface) ? mmc (module mapping control) ? int (interrupt control) ? bkp (breakpoints) ? bdm (background debug mode)  crg (low current oscillator, pll, reset, clocks, cop watchdog, real time interrupt, clock monitor)  8-bit and 4-bit ports with interrupt functionality ? digital filtering ? programmable rising or falling edge trigger  memory ? 128k flash eeprom ? 2k byte eeprom ? 8k byte ram
mc9s12a128 device guide ? v01.01 16  two 8-channel analog-to-digital converters ? 10-bit resolution ? external conversion trigger capability  enhanced capture timer ? 16-bit main counter with 7-bit prescaler ? 8 programmable input capture or output compare channels ? two 8-bit or one 16-bit pulse accumulators  8 pwm channels ? programmable period and duty cycle ? 8-bit 8-channel or 16-bit 4-channel ? separate control for each pulse width and duty cycle ? center-aligned or left-aligned outputs ? programmable clock select logic with a wide range of frequencies ? fast emergency shutdown input ? usable as interrupt inputs  serial interfaces ? two asynchronous serial communications interfaces (sci) ? two synchronous serial peripheral interface (spi)  inter-ic bus (iic) ? compatible with i2c bus standard ? multi-master operation ? software programmable for one of 256 different serial clock frequencies  112-pin lqfp and 80-pin qfp packages ? i/o lines with 5v input and drive capability ? 5v a/d converter inputs ? operation at 50mhz equivalent to 25mhz bus speed ? development support ? single-wire background debug ? mode (bdm) ? on-chip hardware breakpoints
mc9s12a128 device guide ? v01.01 17 1.3 modes of operation user modes  normal and emulation operating modes ? normal single-chip mode ? normal expanded wide mode ? normal expanded narrow mode ? emulation expanded wide mode ? emulation expanded narrow mode  special operating modes ? special single-chip mode with active background debug mode ? special test mode ( motorola use only ) ? special peripheral mode ( motorola use only ) low power modes  stop mode  pseudo stop mode  wait mode
mc9s12a128 device guide ? v01.01 18 1.4 block diagram figure 1-1 shows a block diagram of the mc9s12a128 device.
mc9s12a128 device guide ? v01.01 19 figure 1-1 mc9s12a128 block diagram 128k byte flash eeprom 8k byte ram enhanced capture reset extal xtal vdd1,2 vss1,2 sci0 2k byte eeprom bkgd r/w modb xirq noacc/xclks system integration module (sim) vddr cpu12 periodic interrupt cop watchdog clock monitor single-wire background breakpoints pll vsspll xfc vddpll multiplexed address/data bus vdda vssa vrh vrl atd0 multiplexed wide bus multiplexed vddx vssx internal logic 2.5v narrow bus ppage vddpll vsspll pll 2.5v irq lstrb eclk moda pa4 pa3 pa2 pa1 pa0 pa7 pa6 pa5 test addr12 addr11 addr10 addr9 addr8 addr15 addr14 addr13 data12 data11 data10 data9 data8 data15 data14 data13 pb4 pb3 pb2 pb1 pb0 pb7 pb6 pb5 addr4 addr3 addr2 addr1 addr0 addr7 addr6 addr5 data4 data3 data2 data1 data0 data7 data6 data5 data4 data3 data2 data1 data0 data7 data6 data5 pe3 pe4 pe5 pe6 pe7 pe0 pe1 pe2 an2 an6 an0 an7 an1 an3 an4 an5 pad0 3 pad0 4 pad0 5 pad0 6 pad0 7 pad0 0 pad0 1 pad0 2 ioc2 ioc6 ioc0 ioc7 ioc1 ioc3 ioc4 ioc5 pt3 pt4 pt5 pt6 pt7 pt0 pt1 pt2 vrh vrl vdda vssa vrh vrl atd1 an2 an6 an0 an7 an1 an3 an4 an5 pad11 pad12 pad13 pad14 pad15 pad08 pad09 pad10 vdda vssa rxd txd miso mosi ps3 ps4 ps5 ps0 ps1 ps2 sci1 rxd txd pp3 pp4 pp5 pp6 pp7 pp0 pp1 pp2 pix2 pix0 pix1 pix3 ecs pk3 pk7 pk0 pk1 xaddr17 ecs xaddr14 xaddr15 xaddr16 sck ss ps6 ps7 spi0 iic sda scl pj6 pj7 pm1 pm0 pm2 pm3 pm4 pm5 pm6 pm7 kwh2 kwh6 kwh0 kwh7 kwh1 kwh3 kwh4 kwh5 ph3 ph4 ph5 ph6 ph7 ph0 ph1 ph2 kwj0 kwj1 pj0 pj1 i/o driver 5v vdda vssa a/d converter 5v & ddra ddrb pta ptb ddre pte ad1 ad0 ptk ddrk ptt ddrt ptp ddrp pts ddrs ptm ddrm pth ddrh ptj ddrj pk2 clock and reset generation module voltage regulator vssr debug module vdd1,2 vss1,2 vregen vddr vssr voltage regulator 5v & i/o miso mosi sck ss spi1 pix4 pix5 pk4 pk5 xaddr18 xaddr19 voltage regulator reference kwp2 kwp6 kwp0 kwp7 kwp1 kwp3 kwp4 kwp5 kwj6 kwj7 timer signals shown in bold are not available on the 80 pin package module to port routing pwm2 pwm6 pwm0 pwm7 pwm1 pwm3 pwm4 pwm5 pwm
mc9s12a128 device guide ? v01.01 20 1.5 device memory map table 1-1 and figure 1-2 show the device memory map of the mc9s12a128 after reset. note that after reset the bottom 1k of the eeprom ($0000 - $03ff) are hidden by the register space. table 1-1 device memory map address module size (bytes) $0000 ? $0017 core (ports a, b, e, modes, inits, test) 24 $0018 ? $0019 reserved 2 $001a ? $001b device id register (partid) 2 $001c ? $001f core (memsiz, irq, hprio) 4 $0020 ? $0027 reserved 8 $0028 ? $002f core (background debug mode) 8 $0030 ? $0033 core (ppage, port k) 4 $0034 ? $003f clock and reset generator (pll, rti, cop) 12 $0040 ? $007f enhanced capture timer 16-bit 8 channels 64 $0080 ? $009f analog to digital converter 10-bit 8 channels (atd0) 32 $00a0 ? $00c7 pulse width modulator 8-bit 8 channels (pwm) 40 $00c8 ? $00cf serial communications interface 0 (sci0) 8 $00d0 ? $00d7 serial communications interface 0 (sci1) 8 $00d8 ? $00df serial peripheral interface (spi0) 8 $00e0 ? $00e7 inter ic bus 8 $00e8 ? $00ef reserved 8 $00f0 ? $00f7 serial peripheral interface (spi1) 8 $00f8 ? $00ff reserved 8 $0100- $010f flash control register 16 $0110 ? $011b eeprom control register 12 $011c ? $011f reserved 4 $0120 ? $013f analog to digital converter 10-bit 8 channels (atd1) 32 $0140 ? $023f reserved 256 $0240 ? $027f port integration module (pim) 64 $0280 ? $03ff reserved 384 $0000 ? $07ff eeprom array 2048 $0000 ? $1fff ram array 8192 $4000 ? $7fff fixed flash eeprom array incl. 0.5k, 1k, 2k or 4k protected sector at start 16384 $8000 ? $bfff flash eeprom page window 16384 $c000 ? $ffff fixed flash eeprom array incl. 0.5k, 1k, 2k or 4k protected sector at end and 256 bytes of vector space at $ff80 ? $ffff 16384
mc9s12a128 device guide ? v01.01 21 figure 1-2 mc9s12a128 memory map $0000 $ffff $c000 $8000 $4000 $0400 $0800 $1000 $2000 $ff00 ext normal single chip expanded special single chip vectors vectors vectors $ff00 $ffff bdm (if active) $c000 $ffff 16k fixed flash eeprom 2k, 4k, 8k or 16k protected boot sector $8000 $bfff 16k page window eight * 16k flash eeprom pages $4000 $7fff 16k fixed flash eeprom 0.5k, 1k, 2k or 4k protected sector $2000 $3fff 8k bytes ram mappable to any 8k boundary $0800 $0fff 2k bytes eeprom mappable to any 2k boundary $0000 $03ff 1k register space mappable to any 2k boundary the address does not show the map after reset, but a useful map. after reset the map is: $0000 ? $03ff: register space $0000 ? $1fff: 8k ram $0000 ? $07ff: 2k eeprom (not visible) $2000 ? $3fff: 8k flash
mc9s12a128 device guide ? v01.01 22 1.6 part id assignments the part id is located in two 8-bit registers partidh and partidl (addresses $001a and $001b after reset). the read-only value is a unique part id for each revision of the chip. table 1-2 shows the assigned part id number. the device memory sizes are located in two 8-bit registers memsiz0 and memsiz1 (addresses $001c and $001d after reset). table 1-3 shows the read-only values of these registers. refer to the hcs12 core user guide (motorola document order number hcs12coreug/d) for further details. table 1-2 assigned part id numbers device mask set number part id 1 notes : 1. the coding is as follows: bit 15-12: major family identifier bit 11-8: minor family identifier bit 7-4: major mask set revision number including fab transfers bit 3-0: minor - non full - mask set revision mc9s12a128 0l85d $0100 table 1-3 memory size registers register name value memsiz0 $13 memsiz1 $80
mc9s12a128 device guide ? v01.01 23 section 2 signal description this section describes signals that connect off-chip. it includes a pinout diagram, a table of signal properties, and detailed discussion of signals. it is built from the signal description sections of the block guides of the individual ip blocks on the device. 2.1 device pinout the mc9s12a128 is available in a 112-pin low profile quad flat pack (lqfp) and is also available in a 80-pin quad flat pack (qfp). most pins perform two or more functions, as described in the 2.3 detailed signal descriptions . figure 2-1 and figure 2-2 show the pin assignments.
mc9s12a128 device guide ? v01.01 24 figure 2-1 pin assignments in 112-pin lqfp vrh vdda pad15/an15/etrig1 pad07/an07/etrig0 pad14/an14 pad06/an06 pad13/an13 pad05/an05 pad12/an12 pad04/an04 pad11/an11 pad03/an03 pad10/an10 pad02/an02 pad09/an09 pad01/an01 pad08/an08 pad00/an00 vss2 vdd2 pa7/addr15/data15 pa6/addr14/data14 pa5/addr13/data13 pa4/addr12/data12 pa3/addr11/data11 pa2/addr10/data10 pa1/addr9/data9 pa0/addr8/data8 pp4/kwp4/pwm4 pp5/kpw5/pwm5 pp6/kwp6/pwm6 pp7/kwp7/pwm7 pk7/ecs vddx vssx pm0 pm1 pm2/miso0 pm3/ss0 pm4/mosi pm5/sck0 pj6/kwj6/sda pj7/kwj7/scl vregen ps7/ss0 ps6/sck0 ps5/mosi0 ps4/miso0 ps3/txd1 ps2/rxd1 ps1/txd0 ps0/rxd0 pm6 pm7 vssa vrl ss1 /pwm3/kwp3/pp3 sck1/pwm2/kwp2/pp2 mosi1/pwm1/kwp1/pp1 miso1/pwm0/kwp0/pp0 xaddr17/pk3 xaddr16/pk2 xaddr15/pk1 xaddr14/pk0 ioc0/pt0 ioc1/pt1 ioc2/pt2 ioc3/pt3 vdd1 vss1 ioc4/pt4 ioc5/pt5 ioc6/pt6 ioc7/pt7 xaddr19/pk5 xaddr18/pk4 kwj1/pj1 kwj0/pj0 modc/taghi/ bkgd addr0/data0/pb0 addr1/data1/pb1 addr2/data2/pb2 addr3/data3/pb3 addr4/data4/pb4 addr5/data5/pb5 addr6/data6/pb6 addr7/data7/pb7 kwh7/ph7 kwh6/ph6 kwh5/ph5 kwh4/ph4 xclks /noacc/pe7 modb/ipipe1/pe6 moda/ipipe0/pe5 eclk/pe4 vssr vddr reset vddpll xfc vsspll extal xtal test ss1 /kwh3/ph3 sck1/kwh2/ph2 mosi1/kwh1/ph1 miso1/kwh0/ph0 lstrb /taglo /pe3 r/w /pe2 irq /pe1 xirq /pe0 signals shown in bold are not available on the 80 pin package mc9s12a128 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57
mc9s12a128 device guide ? v01.01 25 figure 2-2 pin assignments in 80-pin qfp for mc9s12a128 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 mc9s12a128 vrh vdda pad07/an07/etrig0 pad06/an06 pad05/an05 pad04/an04 pad03/an03 pad02/an02 pad01/an01 pad00/an00 vss2 vdd2 pa7/addr15/data15 pa6/addr14/data14 pa5/addr13/data13 pa4/addr12/data12 pa3/addr11/data11 pa2/addr10/data10 pa1/addr9/data9 pa0/addr8/data8 pp4/kwp4/pwm4 pp5/kwp5/pwm5 pp7/kwp7/pwm7 vddx vssx pm0 pm1 pm2/miso0 pm3/ss0 pm4/mosi0 pm5/sck0 pj6/kwj6/sda pj7/kwj7/scl vregen ps3/txd1 ps2/rxd1 ps1/txd0 ps0/rxd0 vssa vrl ss1 /pwm3/kwp3/pp3 sck1/pwm2/kwp2/pp2 mosi1/pwm1/kwp1/pp1 miso1/pwm0/kwp0/pp0 ioc0/pt0 ioc1/pt1 ioc2/pt2 ioc3/pt3 vdd1 vss1 ioc4/pt4 ioc5/pt5 ioc6/pt6 ioc7/pt7 modc/taghi/ bkgd addr0/data0/pb0 addr1/data1/pb1 addr2/data2/pb2 addr3/data3/pb3 addr4/data4/pb4 addr5/data5/pb5 addr6/data6/pb6 addr7/data7/pb7 xclks /noacc/pe7 modb/ipipe1/pe6 moda/ipipe0/pe5 eclk/pe4 vssr vddr reset vddpll xfc vsspll extal xtal test lstrb /taglo /pe3 r/w /pe2 irq /pe1 xirq /pe0 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41
mc9s12a128 device guide ? v01.01 26 2.2 signal properties summary table 2-1 summarizes the pin functionality. signals shown in bold are not available in the 80 pin package. table 2-1 signal properties pin name function 1 pin name function 2 pin name function 3 pin name function 4 powered by description extal ??? v ddpll oscillator pins xtal ??? reset ??? v ddr external reset test ??? n.a. test input vregen ??? v ddx voltage regulator enable input xfc ??? v ddpll pll loop filter bkgd taghi modc ? v ddr background debug, tag high, mode input pad15 an15 etrig1 ? v dda port ad input, analog input an7 of atd1, external trigger input of atd1 pad[14:8] an[14:08] ?? port ad inputs, analog inputs an[6:0] of atd1 pad07 an07 etrig0 ? port ad input, analog input an7 of atd0, external trigger input of atd0 pad[06:00] an[06:00] ?? port ad inputs, analog inputs an[6:0] of atd0 pa[7:0] addr[15:8]/ data[15:8] ?? v ddr port a i/o, multiplexed address/data pb[7:0] addr[7:0]/ data[7:0] ?? port b i/o, multiplexed address/data pe7 noacc xclks ? port e i/o, access, clock select pe6 ipipe1 modb ? port e i/o, pipe status, mode input pe5 ipipe0 moda ? port e i/o, pipe status, mode input pe4 eclk ?? port e i/o, bus clock output pe3 lstrb taglo ? port e i/o, byte strobe, tag low pe2 r/w ?? port e i/o, r/w in expanded modes pe1 irq ?? port e input, maskable interrupt pe0 xirq ?? port e input, non maskable interrupt ph7 kwh7 ?? port h i/o, interrupt ph6 kwh6 ?? port h i/o, interrupt ph5 kwh5 ?? port h i/o, interrupt ph4 kwh4 ?? port h i/o, interrupt ph3 kwh3 ss1 ? port h i/o, interrupt, ss of spi1 ph2 kwh2 sck1 ? port h i/o, interrupt, sck of spi1 ph1 kwh1 mosi1 ? port h i/o, interrupt, mosi of spi1 ph0 kwh0 miso1 ? port h i/o, interrupt, miso of spi1
mc9s12a128 device guide ? v01.01 27 pj7 kwj7 scl v ddx port j i/o, interrupt, scl of iic pj6 kwj6 sda port j i/o, interrupt, sda of iic pj[1:0] kwj[1:0] ?? port j i/o, interrupts pk7 ecs romon ? port k i/o, emulation chip select, rom on enable pk[5:0] xaddr[19:14] ? port k i/o, extended addresses pm7 ??? port m i/o pm6 ??? port m i/o pm5 sck0 ?? port m i/o, sck of spi0 pm4 mosi0 ?? port m i/o, mosi of spi0 pm3 ss0 ?? port m i/o, ss of spi0 pm2 miso0 ?? port m i/o, miso of spi0 pm1 ??? port m i/o pm0 ??? port m i/o pp7 kwp7 pwm7 ? port p i/o, interrupt, channel 7 of pwm pp6 kwp6 pwm6 ? port p i/o, interrupt, channel 6 of pwm pp5 kwp5 pwm5 ? port p i/o, interrupt, channel 5 of pwm pp4 kwp4 pwm4 ? port p i/o, interrupt, channel 4 of pwm pp3 kwp3 pwm3 ss1 port p i/o, interrupt, channel 3 of pwm, ss of spi1 pp2 kwp2 pwm2 sck1 port p i/o, interrupt, channel 2 of pwm, sck of spi1 pp1 kwp1 pwm1 mosi1 port p i/o, interrupt, channel 1 of pwm, mosi of spi1 pp0 kwp0 pwm0 miso1 port p i/o, interrupt, channel 0 of pwm, miso of spi1 ps7 ss0 ?? port s i/o, ss of spi0 ps6 sck0 ?? port s i/o, sck of spi0 ps5 mosi0 ?? port s i/o, mosi of spi0 ps4 miso0 ?? port s i/o, miso of spi0 ps3 txd1 ?? port s i/o, txd of sci1 ps2 rxd1 ?? port s i/o, rxd of sci1 ps1 txd0 ?? port s i/o, txd of sci0 ps0 rxd0 ?? port s i/o, rxd of sci0 pt[7:0] ioc[7:0] ?? port t i/o, timer channels pin name function 1 pin name function 2 pin name function 3 pin name function 4 powered by description
mc9s12a128 device guide ? v01.01 28 2.3 detailed signal descriptions 2.3.1 extal, xtal ? oscillator pins extal and xtal are the crystal driver and external clock pins. on reset all the device clocks are derived from the extal input frequency. xtal is the crystal output. 2.3.2 reset ? external reset pin an active low bidirectional control signal, it acts as an input to initialize the mcu to a known start-up state, and an output when an internal mcu function causes a reset. 2.3.3 test ? test pin this input only pin is reserved for test. note: the test pin must be tied to v ss in all applications. 2.3.4 v regen ? voltage regulator enable pin this input only pin enables or disables the on-chip voltage regulator. 2.3.5 xfc ? pll loop filter pin pll loop filter, see a.5.3 phase locked loop . if needed, contact your motorola representative for the interactive application note to compute pll loop filter elements. any current leakage on this pin must be avoided. figure 2-3 pll loop filter connections mcu xfc r 0 c s c p v ddpll v ddpll
mc9s12a128 device guide ? v01.01 29 2.3.6 bkgd / taghi / modc ? background debug, tag high, and mode pin the bkgd/taghi /modc pin is used as a pseudo-open-drain pin for the background debug communication. in mcu expanded modes of operation when instruction tagging is on, an input low on this pin during the falling edge of e-clock tags the high half of the instruction word being read into the instruction queue. it is used as a mcu operating mode select pin during reset. the state of this pin is latched to the modc bit at the rising edge of reset . 2.3.7 pad15 / an15 / etrig1 ? port ad input pin of atd1 pad15 is a general purpose input pin and analog input an7 of the analog to digital converter atd1. it can act as an external trigger input for the atd1. 2.3.8 pad[14:08] / an[14:08] ? port ad input pins of atd1 pad14 - pad08 are general purpose input pins and analog inputs an[6:0] of the analog to digital converter atd1. 2.3.9 pad7 / an07 / etrig0 ? port ad input pin of atd0 pad7 is a general purpose input pin and analog input an7 of the analog to digital converter atd0. it can act as an external trigger input for the atd0. 2.3.10 pad[06:00] / an[06:00] ? port ad input pins of atd0 pad06 - pad00 are general purpose input pins and analog inputs an[6:0] of the analog to digital converter atd0. 2.3.11 pa[7:0] / addr[15:8] / data[15:8] ? port a i/o pins pa7-pa0 are general purpose input or output pins. in mcu expanded modes of operation, these pins are used for the multiplexed external address and data bus. 2.3.12 pb[7:0] / addr[7:0] / data[7:0] ? port b i/o pins pb7-pb0 are general purpose input or output pins. in mcu expanded modes of operation, these pins are used for the multiplexed external address and data bus. 2.3.13 pe7 / noacc / xclks ? port e i/o pin 7 pe7 is a general purpose input or output pin. during mcu expanded modes of operation, the noacc signal, when enabled, is used to indicate that the current bus cycle is an unused or ? free ? cycle. this signal will assert when the cpu is not using the bus.
mc9s12a128 device guide ? v01.01 30 the xclks input selects between an external clock or oscillator configuration. the state of this pin is latched at the rising edge of reset . if the input is a logic low the extal pin is configured for an external clock drive. if input is a logic high an oscillator circuit is configured on extal and xtal. since this pin is an input with a pull-up device, if the pin is left floating, the default configuration is an oscillator circuit on extal and xtal. 2.3.14 pe6 / modb / ipipe1 ? port e i/o pin 6 pe6 is a general purpose input or output pin. it is used as a mcu operating mode select pin during reset. the state of this pin is latched to the modb bit at the rising edge of reset . this pin is shared with the instruction queue tracking signal ipipe1. this pin is an input with a pull-down device which is only active when reset is low. 2.3.15 pe5 / moda / ipipe0 ? port e i/o pin 5 pe5 is a general purpose input or output pin. it is used as a mcu operating mode select pin during reset. the state of this pin is latched to the moda bit at the rising edge of reset . this pin is shared with the instruction queue tracking signal ipipe0. this pin is an input with a pull-down device which is only active when reset is low. 2.3.16 pe4 / eclk ? port e i/o pin 4 pe4 is a general purpose input or output pin. it can be configured to drive the internal bus clock eclk. eclk can be used as a timing reference. 2.3.17 pe3 / lstrb / taglo ? port e i/o pin 3 pe3 is a general purpose input or output pin. in mcu expanded modes of operation, lstrb can be used for the low-byte strobe function to indicate the type of bus access and when instruction tagging is on, taglo is used to tag the low half of the instruction word being read into the instruction queue. 2.3.18 pe2 / r/w ? port e i/o pin 2 pe2 is a general purpose input or output pin. in mcu expanded modes of operations, this pin drives the read/write output signal for the external bus. it indicates the direction of data on the external bus. 2.3.19 pe1 / irq ? port e input pin 1 pe1 is a general purpose input pin and the maskable interrupt request input that provides a means of applying asynchronous interrupt requests. this will wake up the mcu from stop or wait mode. 2.3.20 pe0 / xirq ? port e input pin 0 pe0 is a general purpose input pin and the non-maskable interrupt request input that provides a means of applying asynchronous interrupt requests. this will wake up the mcu from stop or wait mode.
mc9s12a128 device guide ? v01.01 31 2.3.21 ph7 / kwh7 ? port h i/o pin 7 ph7 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. 2.3.22 ph6 / kwh6 ? port h i/o pin 6 ph6 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. 2.3.23 ph5 / kwh5 ? port h i/o pin 5 ph5 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. 2.3.24 ph4 / kwh4 ? port h i/o pin 4 ph4 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. 2.3.25 ph3 / kwh3 / ss1 ? port h i/o pin 3 ph3 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. it can be configured as slave select pin ss of the serial peripheral interface 1 (spi1). 2.3.26 ph2 / kwh2 / sck1 ? port h i/o pin 2 ph2 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. it can be configured as serial clock pin sck of the serial peripheral interface 1 (spi1). 2.3.27 ph1 / kwh1 / mosi1 ? port h i/o pin 1 ph1 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. it can be configured as master output (during master mode) or slave input pin (during slave mode) mosi of the serial peripheral interface 1 (spi1). 2.3.28 ph0 / kwh0 / miso1 ? port h i/o pin 0 ph0 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. it can be configured as master input (during master mode) or slave output (during slave mode) pin miso of the serial peripheral interface 1 (spi1).
mc9s12a128 device guide ? v01.01 32 2.3.29 pj7 / kwj7 / scl ? port j i/o pin 7 pj7 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. it can be configured as the serial clock pin scl of the iic module. 2.3.30 pj6 / kwj6 / sda ? port j i/o pin 6 pj6 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. it can be configured as the serial data pin sda of the iic module. 2.3.31 pj[1:0] / kwj[1:0] ? port j i/o pins [1:0] pj1 and pj0 are general purpose input or output pins. they can be configured to generate an interrupt causing the mcu to exit stop or wait mode. 2.3.32 pk7 / ecs / romon ? port k i/o pin 7 pk7 is a general purpose input or output pin. during mcu expanded modes of operation, this pin is used as the emulation chip select output (ecs ). during mcu normal expanded modes of operation, this pin is used to enable the flash eeprom memory in the memory map (romon). at the rising edge of reset , the state of this pin is latched to the romon bit. 2.3.33 pk[5:0] / xaddr[19:14] ? port k i/o pins [5:0] pk5-pk0 are general purpose input or output pins. in mcu expanded modes of operation, these pins provide the expanded address xaddr[19:14] for the external bus. 2.3.34 pm7 ? port m i/o pin 7 pm7 is a general purpose input or output pin. 2.3.35 pm6 ? port m i/o pin 6 pm6 is a general purpose input or output pin. 2.3.36 pm5 / sck0 ? port m i/o pin 5 pm5 is a general purpose input or output pin. it can be configured as the serial clock pin sck of the serial peripheral interface 0 (spi0). 2.3.37 pm4 / mosi0 ? port m i/o pin 4 pm4 is a general purpose input or output pin. it can be configured as the master output (during master mode) or slave input pin (during slave mode) mosi for the serial peripheral interface 0 (spi0).
mc9s12a128 device guide ? v01.01 33 2.3.38 pm3 / ss0 ? port m i/o pin 3 pm3 is a general purpose input or output pin. it can be configured as the slave select pin ss of the serial peripheral interface 0 (spi0). 2.3.39 pm2 / miso0 ? port m i/o pin 2 pm2 is a general purpose input or output pin. it can be configured as the master input (during master mode) or slave output pin (during slave mode) miso for the serial peripheral interface 0 (spi0). 2.3.40 pm1 ? port m i/o pin 1 pm1 is a general purpose input or output pin. 2.3.41 pm0 ? port m i/o pin 0 pm0 is a general purpose input or output pin. 2.3.42 pp7 / kwp7 / pwm7 ? port p i/o pin 7 pp7 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. it can be configured as pulse width modulator (pwm) channel 7 output. 2.3.43 pp6 / kwp6 / pwm6 ? port p i/o pin 6 pp6 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. it can be configured as pulse width modulator (pwm) channel 6 output. 2.3.44 pp5 / kwp5 / pwm5 ? port p i/o pin 5 pp5 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. it can be configured as pulse width modulator (pwm) channel 5 output. 2.3.45 pp4 / kwp4 / pwm4 ? port p i/o pin 4 pp4 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. it can be configured as pulse width modulator (pwm) channel 4 output 2.3.46 pp3 / kwp3 / pwm3 / ss1 ? port p i/o pin 3 pp3 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. it can be configured as pulse width modulator (pwm) channel 3 output. it can be configured as slave select pin ss of the serial peripheral interface 1 (spi1).
mc9s12a128 device guide ? v01.01 34 2.3.47 pp2 / kwp2 / pwm2 / sck1 ? port p i/o pin 2 pp2 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. it can be configured as pulse width modulator (pwm) channel 2 output. it can be configured as serial clock pin sck of the serial peripheral interface 1 (spi1). 2.3.48 pp1 / kwp1 / pwm1 / mosi1 ? port p i/o pin 1 pp1 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. it can be configured as pulse width modulator (pwm) channel 1 output. it can be configured as master output (during master mode) or slave input pin (during slave mode) mosi of the serial peripheral interface 1 (spi1). 2.3.49 pp0 / kwp0 / pwm0 / miso1 ? port p i/o pin 0 pp0 is a general purpose input or output pin. it can be configured to generate an interrupt causing the mcu to exit stop or wait mode. it can be configured as pulse width modulator (pwm) channel 0 output. it can be configured as master input (during master mode) or slave output (during slave mode) pin miso of the serial peripheral interface 1 (spi1). 2.3.50 ps7 / ss0 ? port s i/o pin 7 ps7 is a general purpose input or output pin. it can be configured as the slave select pin ss of the serial peripheral interface 0 (spi0). 2.3.51 ps6 / sck0 ? port s i/o pin 6 ps6 is a general purpose input or output pin. it can be configured as the serial clock pin sck of the serial peripheral interface 0 (spi0). 2.3.52 ps5 / mosi0 ? port s i/o pin 5 ps5 is a general purpose input or output pin. it can be configured as master output (during master mode) or slave input pin (during slave mode) mosi of the serial peripheral interface 0 (spi0). 2.3.53 ps4 / miso0 ? port s i/o pin 4 ps4 is a general purpose input or output pin. it can be configured as master input (during master mode) or slave output pin (during slave mode) mosi of the serial peripheral interface 0 (spi0). 2.3.54 ps3 / txd1 ? port s i/o pin 3 ps3 is a general purpose input or output pin. it can be configured as the transmit pin txd of serial communication interface 1 (sci1).
mc9s12a128 device guide ? v01.01 35 2.3.55 ps2 / rxd1 ? port s i/o pin 2 ps2 is a general purpose input or output pin. it can be configured as the receive pin rxd of serial communication interface 1 (sci1). 2.3.56 ps1 / txd0 ? port s i/o pin 1 ps1 is a general purpose input or output pin. it can be configured as the transmit pin txd of serial communication interface 0 (sci0). 2.3.57 ps0 / rxd0 ? port s i/o pin 0 ps0 is a general purpose input or output pin. it can be configured as the receive pin rxd of serial communication interface 0 (sci0). 2.3.58 pt[7:0] / ioc[7:0] ? port t i/o pins [7:0] pt7-pt0 are general purpose input or output pins. they can be configured as input capture or output compare pins ioc7-ioc0 of the enhanced capture timer (ect). 2.4 power supply pins mc9s12a128 power and ground pins are described below. note: all v ss pins must be connected together in the application. 2.4.1 v ddx , v ssx ? power & ground pins for i/o drivers external power and ground for i/o drivers. because fast signal transitions place high, short-duration current demands on the power supply, use bypass capacitors with high-frequency characteristics and place them as close to the mcu as possible. bypass requirements depend on how heavily the mcu pins are loaded. 2.4.2 v ddr , v ssr ? power & ground pins for i/o drivers & for internal voltage regulator external power and ground for i/o drivers and input to the internal voltage regulator. because fast signal transitions place high, short-duration current demands on the power supply, use bypass capacitors with high-frequency characteristics and place them as close to the mcu as possible. bypass requirements depend on how heavily the mcu pins are loaded.
mc9s12a128 device guide ? v01.01 36 2.4.3 v dd1 , v dd2 , v ss1 , v ss2 ? core power pins power is supplied to the mcu through v dd and v ss . because fast signal transitions place high, short-duration current demands on the power supply, use bypass capacitors with high-frequency characteristics and place them as close to the mcu as possible. this 2.5v supply is derived from the internal voltage regulator. there is no static load on those pins allowed. the internal voltage regulator is turned off, if v regen is tied to ground. note: no load allowed except for bypass capacitors. 2.4.4 v dda , v ssa ? power supply pins for atd and vreg v dda , v ssa are the power supply and ground input pins for the voltage regulator and the analog to digital converter. it also provides the reference for the internal voltage regulator. this allows the supply voltage to the atd and the reference voltage to be bypassed independently. 2.4.5 v rh , v rl ? atd reference voltage input pins v rh and v rl are the reference voltage input pins for the analog to digital converter. 2.4.6 v ddpll , v sspll ? power supply pins for pll provides operating voltage and ground for the oscillator and the phased-locked loop. this allows the supply voltage to the oscillator and pll to be bypassed independently. this 2.5v voltage is generated by the internal voltage regulator. note: no load allowed except for bypass capacitors. 2.4.7 v regen ? on chip voltage regulator enable enables the internal 5v to 2.5v voltage regulator. if this pin is tied low, v dd1,2 and v ddpll must be supplied externally.
mc9s12a128 device guide ? v01.01 37 table 2-2 mc9s12a128 power and ground connection summary mnemonic pin number nominal voltage description 112-pin qfp v dd1, 2 13, 65 2.5 v internal power and ground generated by internal regulator v ss1, 2 14, 66 0v v ddr 41 5.0 v external power and ground, supply to pin drivers and internal voltage regulator. v ssr 40 0 v v ddx 107 5.0 v external power and ground, supply to pin drivers. v ssx 106 0 v v dda 83 5.0 v operating voltage and ground for the analog-to-digital converters and the reference for the internal voltage regulator, allows the supply voltage to the a/d to be bypassed independently. v ssa 86 0 v v rl 85 0 v reference voltages for the analog-to-digital converter. v rh 84 5.0 v v ddpll 43 2.5 v provides operating voltage and ground for the phased-locked loop. this allows the supply voltage to the pll to be bypassed independently. internal power and ground generated by internal regulator. v sspll 45 0 v v regen 97 5v internal voltage regulator enable/disable
mc9s12a128 device guide ? v01.01 38
mc9s12a128 device guide ? v01.01 39 section 3 system clock description 3.1 overview the clock and reset generator provides the internal clock signals for the core and all peripheral modules. figure 3-1 shows the clock connections from the crg to all modules. consult the hcs12 clock and reset generator ( crg) block guide (motorola document order number, s12crgv3/d) for details on clock generation. figure 3-1 clock connections crg bus clock core clock extal xtal oscillator clock s12_core iic ram sci0, sci1 pwm atd0, 1 eeprom flash ect spi0, 1 pim bdm 1/2
mc9s12a128 device guide ? v01.01 40
mc9s12a128 device guide ? v01.01 41 section 4 modes of operation 4.1 overview eight possible modes determine the operating configuration of the mc9s12a128. each mode has an associated default memory map and external bus configuration. three low power modes exist for the device. 4.2 modes of operation the operating mode out of reset is determined by the states of the modc, modb, and moda pins during reset ( table 4-1 ). the modc, modb, and moda bits in the mode register show the current operating mode and provide limited mode switching during operation. the states of the modc, modb, and moda pins are latched into these bits on the rising edge of the reset signal. there are two basic types of operating modes: 1. normal modes: some registers and bits are protected against accidental changes. 2. special modes: allow greater access to protected control registers and bits for special purposes such as testing. a system development and debug feature, background debug mode (bdm), is available in all modes. in special single-chip mode, bdm is active immediately after reset. some aspects of port e are not mode dependent. bit 1 of port e is a general purpose input or the irq interrupt input. irq can be enabled by bits in the cpu ? s condition codes register but it is inhibited at reset so this pin is initially configured as a simple input with a pull-up. bit 0 of port e is a general purpose input or the xirq interrupt input. xirq can be enabled by bits in the cpu ? s condition codes register but it is inhibited at reset so this pin is initially configured as a simple input with a pull-up. the estr bit in the ebictl register is set to one by reset in any user mode. this assures that the reset vector can be fetched table 4-1 mode selection modc modb moda mode description 000 special single chip, bdm allowed and active. bdm is allowed in all other modes but a serial command is required to make bdm active. 0 0 1 emulation expanded narrow, bdm allowed 0 1 0 special test (expanded wide), bdm allowed 0 1 1 emulation expanded wide, bdm allowed 1 0 0 normal single chip, bdm allowed 1 0 1 normal expanded narrow, bdm allowed 110 peripheral; bdm allowed but bus operations would cause bus conflicts (must not be used) 1 1 1 normal expanded wide, bdm allowed
mc9s12a128 device guide ? v01.01 42 even if it is located in an external slow memory device. the pe6/modb/ipipe1 and pe5/moda/ipipe0 pins act as high-impedance mode select inputs during reset. the following paragraphs discuss the default bus setup and describe which aspects of the bus can be changed after reset on a per mode basis. 4.2.1 normal operating modes these modes provide three operating configurations. background debug is available in all three modes, but must first be enabled for some operations by means of a bdm background command, then activated. 4.2.1.1 normal single-chip mode there is no external expansion bus in this mode. all pins of ports a, b and e are configured as general purpose i/o pins port e bits 1 and 0 are available as general purpose input only pins with internal pull-ups enabled. all other pins of port e are bidirectional i/o pins that are initially configured as high-impedance inputs with internal pull-ups enabled. ports a and b are configured as high-impedance inputs with their internal pull-ups disabled. the pins associated with port e bits 6, 5, 3, and 2 cannot be configured for their alternate functions ipipe1, ipipe0, lstrb , and r/w while the mcu is in single chip modes. in single chip modes, the associated control bits pipoe, lstre, and rdwe are reset to zero. writing the opposite state into them in single chip mode does not change the operation of the associated port e pins. in normal single chip mode, the mode register is writable one time. this allows a user program to change the bus mode to narrow or wide expanded mode and/or turn on visibility of internal accesses. port e, bit 4 can be configured for a free-running e clock output by clearing neclk=0. typically the only use for an e clock output while the mcu is in single chip modes would be to get a constant speed clock for use in the external application system. 4.2.1.2 normal expanded wide mode in expanded wide modes, ports a and b are configured as a 16-bit multiplexed address and data bus and port e bit 4 is configured as the e clock output signal. these signals allow external memory and peripheral devices to be interfaced to the mcu. port e pins other than pe4/eclk are configured as general purpose i/o pins (initially high-impedance inputs with internal pull-up resistors enabled). control bits pipoe, neclk, lstre, and rdwe in the pear register can be used to configure port e pins to act as bus control outputs instead of general purpose i/o pins. it is possible to enable the pipe status signals on port e bits 6 and 5 by setting the pipoe bit in pear, but it would be unusual to do so in this mode. development systems where pipe status signals are monitored would typically use the special variation of this mode. the port e bit 2 pin can be reconfigured as the r/w bus control signal by writing ? 1 ? to the rdwe bit in pear. if the expanded system includes external devices that can be written, such as ram, the rdwe bit
mc9s12a128 device guide ? v01.01 43 would need to be set before any attempt to write to an external location. if there are no writable resources in the external system, pe2 can be left as a general purpose i/o pin. the port e bit 3 pin can be reconfigured as the lstrb bus control signal by writing ? 1 ? to the lstre bit in pear. the default condition of this pin is a general purpose input because the lstrb function is not needed in all expanded wide applications. the port e bit 4 pin is initially configured as eclk output with stretch. the e clock output function depends upon the settings of the neclk bit in the pear register, the ivis bit in the mode register and the estr bit in the ebictl register. the e clock is available for use in external select decode logic or as a constant speed clock for use in the external application system. 4.2.1.3 normal expanded narrow mode this mode is used for lower cost production systems that use 8-bit wide external eproms or rams. such systems take extra bus cycles to access 16-bit locations but this may be preferred over the extra cost of additional external memory devices. ports a and b are configured as a 16-bit address bus and port a is multiplexed with data. internal visibility is not available in this mode because the internal cycles would need to be split into two 8-bit cycles. since the pear register can only be written one time in this mode, use care to set all bits to the desired states during the single allowed write. the pe3/lstrb pin is always a general purpose i/o pin in normal expanded narrow mode. although it is possible to write the lstre bit in pear to ? 1 ? in this mode, the state of lstre is overridden and port e bit 3 cannot be reconfigured as the lstrb output. it is possible to enable the pipe status signals on port e bits 6 and 5 by setting the pipoe bit in pear, but it would be unusual to do so in this mode. lstrb would also be needed to fully understand system activity. development systems where pipe status signals are monitored would typically use special expanded wide mode or occasionally special expanded narrow mode. the pe4/eclk pin is initially configured as eclk output with stretch. the e clock output function depends upon the settings of the neclk bit in the pear register, the ivis bit in the mode register and the estr bit in the ebictl register. in normal expanded narrow mode, the e clock is available for use in external select decode logic or as a constant speed clock for use in the external application system. the pe2/r/w pin is initially configured as a general purpose input with a pull-up but this pin can be reconfigured as the r/w bus control signal by writing ? 1 ? to the rdwe bit in pear. if the expanded narrow system includes external devices that can be written such as ram, the rdwe bit would need to be set before any attempt to write to an external location. if there are no writable resources in the external system, pe2 can be left as a general purpose i/o pin. 4.2.1.4 internal visibility internal visibility is available when the mcu is operating in expanded wide modes or emulation narrow mode. it is not available in single-chip, peripheral or normal expanded narrow modes. internal visibility is enabled by setting the ivis bit in the mode register.
mc9s12a128 device guide ? v01.01 44 if an internal access is made while e, r/w , and lstrb are configured as bus control outputs and internal visibility is off (ivis=0), e will remain low for the cycle, r/w will remain high, and address, data and the lstrb pins will remain at their previous state. when internal visibility is enabled (ivis=1), certain internal cycles will be blocked from going external. during cycles when the bdm is selected, r/w will remain high, data will maintain its previous state, and address and lstrb pins will be updated with the internal value. during cpu no access cycles when the bdm is not driving, r/w will remain high, and address, data and the lstrb pins will remain at their previous state. 4.2.1.5 emulation expanded wide mode in expanded wide modes, ports a and b are configured as a 16-bit multiplexed address and data bus and port e provides bus control and status signals. these signals allow external memory and peripheral devices to be interfaced to the mcu. these signals can also be used by a logic analyzer to monitor the progress of application programs. the bus control related pins in port e (pe7/noacc, pe6/modb/ipipe1, pe5/moda/ipipe0, pe4/eclk, pe3/lstrb /taglo , and pe2/r/w ) are all configured to serve their bus control output functions rather than general purpose i/o. notice that writes to the bus control enable bits in the pear register in emulation mode are restricted. 4.2.1.6 emulation expanded narrow mode expanded narrow modes are intended to allow connection of single 8-bit external memory devices for lower cost systems that do not need the performance of a full 16-bit external data bus. accesses to internal resources that have been mapped external (i.e. porta, portb, ddra, ddrb, porte, ddre, pear, pucr, rdriv) will be accessed with a 16-bit data bus on ports a and b. accesses of 16-bit external words to addresses which are normally mapped external will be broken into two separate 8-bit accesses using port a as an 8-bit data bus. internal operations continue to use full 16-bit data paths. they are only visible externally as 16-bit information if ivis=1. ports a and b are configured as multiplexed address and data output ports. during external accesses, address a15, data d15 and d7 are associated with pa7, address a0 is associated with pb0 and data d8 and d0 are associated with pa0. during internal visible accesses and accesses to internal resources that have been mapped external, address a15 and data d15 is associated with pa7 and address a0 and data d0 is associated with pb0. the bus control related pins in port e (pe7/noacc, pe6/modb/ipipe1, pe5/moda/ipipe0, pe4/eclk, pe3/lstrb /taglo , and pe2/r/w ) are all configured to serve their bus control output functions rather than general purpose i/o. notice that writes to the bus control enable bits in the pear register in emulation mode are restricted. the main difference between special modes and normal modes is that some of the bus control and system control signals cannot be written in emulation modes.
mc9s12a128 device guide ? v01.01 45 4.2.2 special operating modes there are two special operating modes that correspond to normal operating modes. these operating modes are commonly used in factory testing and system development. 4.2.2.1 special single-chip mode when the mcu is reset in this mode, the background debug mode is enabled and active. the mcu does not fetch the reset vector and execute application code as it would in other modes. instead the active background mode is in control of cpu execution and bdm firmware is waiting for additional serial commands through the bkgd pin. when a serial command instructs the mcu to return to normal execution, the system will be configured as described below unless the reset states of internal control registers have been changed through background commands after the mcu was reset. there is no external expansion bus after reset in this mode. ports a and b are initially simple bidirectional i/o pins that are configured as high-impedance inputs with internal pull-ups disabled; however, writing to the mode select bits in the mode register (which is allowed in special modes) can change this after reset. all of the port e pins (except pe4/eclk) are initially configured as general purpose high-impedance inputs with pull-ups enabled. pe4/eclk is configured as the e clock output in this mode. the pins associated with port e bits 6, 5, 3, and 2 cannot be configured for their alternate functions ipipe1, ipipe0, lstrb , and r/w while the mcu is in single chip modes. in single chip modes, the associated control bits pipoe, lstre and rdwe are reset to zero. writing the opposite value into these bits in single chip mode does not change the operation of the associated port e pins. port e, bit 4 can be configured for a free-running e clock output by clearing neclk=0. typically the only use for an e clock output while the mcu is in single chip modes would be to get a constant speed clock for use in the external application system. 4.2.2.2 special test mode in expanded wide modes, ports a and b are configured as a 16-bit multiplexed address and data bus and port e provides bus control and status signals. in special test mode, the write protection of many control bits is lifted so that they can be thoroughly tested without needing to go through reset. 4.2.3 test operating mode there is a test operating mode in which an external master, such as an i.c. tester, can control the on-chip peripherals. 4.2.3.1 peripheral mode this mode is intended for motorola factory testing of the mcu. in this mode, the cpu is inactive and an external (tester) bus master drives address, data and bus control signals in through ports a, b and e. in effect, the whole mcu acts as if it was a peripheral under control of an external cpu. this allows faster testing of on-chip memory and peripherals than previous testing methods. since the mode control register is not accessible in peripheral mode, the only way to change to another mode is to reset the mcu into a different mode. background debugging should not be used while the mcu is in special peripheral mode
mc9s12a128 device guide ? v01.01 46 as internal bus conflicts between bdm and the external master can cause improper operation of both functions. 4.3 security the device will make available a security feature preventing the unauthorized read and write of the memory contents. this feature allows:  protection of the contents of flash,  protection of the contents of eeprom,  operation in single-chip mode,  operation from external memory with internal flash and eeprom disabled. the user must be reminded that part of the security must lie with the user ? s code. an extreme example would be user ? s code that dumps the contents of the internal program. this code would defeat the purpose of security. at the same time the user may also wish to put a back door in the user ? s program. an example of this is the user downloads a key through the sci which allows access to a programming routine that updates parameters stored in eeprom. 4.3.1 securing the microcontroller once the user has programmed the flash and eeprom (if desired), the part can be secured by programming the security bits located in the flash module. these non-volatile bits will keep the part secured through resetting the part and through powering down the part. the security byte resides in a portion of the flash array. check the hcs12 128k flash block guide (motorola document order number, s12fts128kv1/d) for more details on the security configuration. 4.3.2 operation of the secured microcontroller 4.3.2.1 normal single chip mode this will be the most common usage of the secured part. everything will appear the same as if the part was not secured with the exception of bdm operation. the bdm operation will be blocked. 4.3.2.2 executing from external memory the user may wish to execute from external space with a secured microcontroller. this is accomplished by resetting directly into expanded mode. the internal flash and eeprom will be disabled. bdm operations will be blocked.
mc9s12a128 device guide ? v01.01 47 4.3.3 unsecuring the microcontroller in order to unsecure the microcontroller, the internal flash and eeprom must be erased. this can be done through an external program in expanded mode. once the user has erased the flash and eeprom, the part can be reset into special single chip mode. this invokes a program that verifies the erasure of the internal flash and eeprom. once this program completes, the user can erase and program the flash security bits to the unsecured state. this is generally done through the bdm, but the user could also change to expanded mode (by writing the mode bits through the bdm) and jumping to an external program (again through bdm commands). note that if the part goes through a reset before the security bits are reprogrammed to the unsecure state, the part will be secured again. 4.4 low power modes consult the respective block guide for information on the module behavior in stop, pseudo stop, and wait mode.
mc9s12a128 device guide ? v01.01 48
mc9s12a128 device guide ? v01.01 49 section 5 resets and interrupts 5.1 overview consult the exception processing section of the hcs12 core user guide (motorola document order number hcs12coreug/d) for information on resets and interrupts. 5.2 vectors 5.2.1 vector table table 5-1 lists interrupt sources and vectors in default order of priority. table 5-1 interrupt vector locations vector address interrupt source ccr mask local enable hprio value to elevate $fffe, $ffff reset none none ? $fffc, $fffd clock monitor fail reset none pllctl (cme, scme) ? $fffa, $fffb cop failure reset none cop rate select ? $fff8, $fff9 unimplemented instruction trap none none ? $fff6, $fff7 swi none none ? $fff4, $fff5 xirq x-bit none ? $fff2, $fff3 irq i-bit irqcr (irqen) $f2 $fff0, $fff1 real time interrupt i-bit crgint (rtie) $f0 $ffee, $ffef enhanced capture timer channel 0 i-bit tie (c0i) $ee $ffec, $ffed enhanced capture timer channel 1 i-bit tie (c1i) $ec $ffea, $ffeb enhanced capture timer channel 2 i-bit tie (c2i) $ea $ffe8, $ffe9 enhanced capture timer channel 3 i-bit tie (c3i) $e8 $ffe6, $ffe7 enhanced capture timer channel 4 i-bit tie (c4i) $e6 $ffe4, $ffe5 enhanced capture timer channel 5 i-bit tie (c5i) $e4 $ffe2, $ffe3 enhanced capture timer channel 6 i-bit tie (c6i) $e2 $ffe0, $ffe1 enhanced capture timer channel 7 i-bit tie (c7i) $e0 $ffde, $ffdf enhanced capture timer overflow i-bit tsrc2 (tof) $de $ffdc, $ffdd pulse accumulator a overflow i-bit pactl (paovi) $dc $ffda, $ffdb pulse accumulator input edge i-bit pactl (pai) $da $ffd8, $ffd9 spi0 i-bit sp0cr1 (spie, sptie) $d8 $ffd6, $ffd7 sci0 i-bit sc0cr2 (tie, tcie, rie, ilie) $d6 $ffd4, $ffd5 sci1 i-bit sc1cr2 (tie, tcie, rie, ilie) $d4 $ffd2, $ffd3 atd0 i-bit atd0ctl2 (ascie) $d2 $ffd0, $ffd1 atd1 i-bit atd1ctl2 (ascie) $d0 $ffce, $ffcf port j i-bit ptjif (ptjie) $ce $ffcc, $ffcd port h i-bit pthif(pthie) $cc $ffca, $ffcb modulus down counter underflow i-bit mcctl(mczi) $ca
mc9s12a128 device guide ? v01.01 50 5.3 effects of reset when a reset occurs, mcu registers and control bits are changed to known start-up states. refer to the respective module block user guides for register reset states. 5.3.1 i/o pins refer to the hcs12 core user guide (motorola document order number hcs12coreug/d) for mode dependent pin configuration of port a, b, e and k out of reset. refer to the mc9s12a128 port integration module (pim) block guide (motorola document order number, s12a128pimv1/d) for reset configurations of all peripheral module ports. note: for devices assembled in 80-pin qfp packages all non-bonded out pins should be configured as outputs after reset in order to avoid current drawn from floating inputs. refer to table 2-1 signal properties for affected pins. 5.3.2 memory refer to table 1-1 device memory map for locations of the memories depending on the operating mode after reset. the ram array is not automatically initialized out of reset. $ffc8, $ffc9 pulse accumulator b overflow i-bit pbctl(pbovi) $c8 $ffc6, $ffc7 crg pll lock i-bit crgint(lockie) $c6 $ffc4, $ffc5 crg self clock mode i-bit crgint (scmie) $c4 $ffc2, $ffc3 reserved $ffc0, $ffc1 iic bus i-bit ibcr (ibie) $c0 $ffbe, $ffbf spi1 i-bit sp1cr1 (spie, sptie) $be $ffbc, $ffbd reserved $ffba, $ffbb eeprom i-bit eectl(ccie, cbeie) $ba $ffb8, $ffb9 flash i-bit fctl(ccie, cbeie) $b8 $ff90 to $ffb7 reserved $ff8e, $ff8f port p interrupt i-bit ptpif (ptpie) $8e $ff8c, $ff8d pwm emergency shutdown i-bit pwmsdn (pwmie) $8c $ff80 to $ff8b reserved
mc9s12a128 device guide ? v01.01 51 section 6 hcs12 core block description consult the hcs12 core user guide (motorola document order number hcs12coreug/d) for information about the hcs12 core modules, i.e. central processing unit (cpu), interrupt module (int), module mapping control module (mmc), multiplexed external bus interface (mebi), breakpoint module (bkp) and background debug mode module (bdm). section 7 clock and reset generator (crg) block description consult the hcs12 clock and reset generator (crg) block guide (motorola document order number, s12crgv3/d) for information about the clock and reset generator module. 7.1 device-specific information 7.1.1 xclks the xclks input signal is active low (see 2.3.13 pe7 / noacc / xclks ? port e i/o pin 7 ). refer to figure 2-3. pierce oscillator connections (xclks=1) of the hcs12 clock and reset generator (crg) block guide (motorola document order number, s12crgv3/d). section 8 enhanced capture timer (ect) block description consult the hcs12 16-bit, 8-channel enhanced capture timer (ect) block guide (motorola document order number, s12ect16b8cv1/d) for information about the enhanced capture timer module. section 9 analog to digital converter (atd) block description there are two analog to digital converters (atd1 and atd0) implemented on the mc9s12a128. consult the hcs12 10-bit, 8-channel analog-to-digital converter (atd) block guide (motorola document order number, s12atd10b8cv2/d) for information about each analog to digital converter module. section 10 inter-ic bus (iic) block description consult the hcs12 inter-integrated circuit (iic) block guide (motorola document order number, s12iicv2/d) for information about the inter-ic bus module.
mc9s12a128 device guide ? v01.01 52 section 11 serial communications interface (sci) block description there are two serial communications interfaces (sci1 and sci0) implemented on the mc9s12a128 device. consult the hcs12 serial communications interface (sci) block guide (motorola document order number, s12sciv2/d) for information about each serial communications interface module. section 12 serial peripheral interface (spi) block description there are two serial peripheral interfaces (spi1 and spi0) implemented on mc9s12a128. consult the hcs12 serial peripheral interface (spi) block guide (motorola document order number, s12spiv2/d) for information about each serial peripheral interface module. section 13 pulse width modulator (pwm) block description consult the hcs12 8-bit, 8-channel pulse width modulator (pwm) block guide (motorola document order number, s12pwm8b8cv1/d) for information about the pulse width modulator module. section 14 flash eeprom 128k block description consult the hcs12 128k flash block guide (motorola document order number, s12fts128kv1/d) for information about the flash module. section 15 eeprom 2k block description consult the hcs12 2k eeprom block guide (motorola document order number, s12eets2kv1/d) for information about the eeprom module. section 16 ram block description this module supports single-cycle misaligned word accesses.
mc9s12a128 device guide ? v01.01 53 section 17 port integration module (pim) block description consult the mc9s12a128 port integration module (pim) block guide (motorola document order number, s12a128pimv1/d) for information about the port integration module. section 18 voltage regulator (v reg ) block description consult the hcs12 voltage regulator block guide (motorola document order number, s12vregv1/d) for information about the dual output linear voltage regulator. component purpose type value c1 v dd1 filter cap ceramic x7r 100 .. 220nf c2 v dd2 filter cap ceramic x7r 100 .. 220nf c3 v dda filter cap ceramic x7r 100nf c4 v ddr filter cap x7r/tantalum >=100nf c5 v ddpll filter cap ceramic x7r 100nf c6 v ddx filter cap x7r/tantalum >=100nf c7 osc load cap c8 osc load cap c9 pll loop filter cap see a.5.3 phase locked loop c10 pll loop filter cap c11 dc cutoff cap r1 pll loop filter res q1 quartz
mc9s12a128 device guide ? v01.01 54 the pcb must be carefully laid out to ensure proper operation of the voltage regulator as well as of the mcu itself. the following rules must be observed:  every supply pair must be decoupled by a ceramic capacitor connected as near as possible to the corresponding pins (c1 - c6).  central point of the ground star should be the v ssr pin.  use low ohmic low inductance connections between v ss1 , v ss2 and v ssr .  v sspll must be directly connected to v ssr .  keep traces of v sspll , extal and xtal as short as possible and occupied board area for c7, c8, c11 and q1 as small as possible.  do not place other signals or supplies underneath area occupied by c7, c8, c10 and q1 and the connection area to the mcu.  central power input should be fed in at the v dda /v ssa pins.
mc9s12a128 device guide ? v01.01 55 figure 18-1 recommended pcb layout 112 lqfp c5 c4 c1 c6 c3 c2 c8 c7 q1 c10 c9 r1 vddx vssx vddr vssr vdd1 vss1 vdd2 vss2 vddpll vsspll vdda vssa vregen c11
mc9s12a128 device guide ? v01.01 56 figure 18-2 recommended pcb layout for 80 qfp c5 c4 c3 c2 c8 c7 c10 c9 r1 c11 c6 c1 q1 vdd1 vss1 vss2 vdd2 vssr vddr vsspll vddpll vdda vssa vssx vregen vddx
mc9s12a128 device guide ? v01.01 57 appendix a electrical characteristics a.1 general note: the electrical characteristics given in this section are preliminary and should be used as a guide only. values cannot be guaranteed by motorola and are subject to change without notice. this supplement contains the most accurate electrical information for the mc9s12a128 microcontroller available at the time of publication. the information should be considered preliminary and is subject to change. this introduction is intended to give an overview on several common topics like power supply, current injection etc. a.1.1 parameter classification the electrical parameters shown in this supplement are guaranteed by various methods. to give the customer a better understanding the following classification is used and the parameters are tagged accordingly in the tables where appropriate. note: this classification is shown in the column labeled ?c? in the parameter tables where appropriate. p: those parameters are guaranteed during production testing on each individual device. c: those parameters are achieved by the design characterization by measuring a statistically relevant sample size across process variations. t: those parameters are achieved by design characterization on a small sample size from typical devices under typical conditions unless otherwise noted. all values shown in the typical column are within this category. d: those parameters are derived mainly from simulations. a.1.2 power supply the mc9s12a128 utilizes several pins to supply power to the i/o ports, a/d converter, oscillator and pll as well as the digital core. the v dda , v ssa pair supplies the a/d converter and the resistor ladder of the internal voltage regulator.
mc9s12a128 device guide ? v01.01 58 the v ddx , v ssx , v ddr and v ssr pairs supply the i/o pins, v ddr supplies also the internal voltage regulator. v dd1 , v ss1 , v dd2 and v ss2 are the supply pins for the digital logic, v ddpll , v sspll supply the oscillator and the pll. v ss1 and v ss2 are internally connected by metal. v dda , v ddx , v ddr as well as v ssa , v ssx , v ssr are connected by anti-parallel diodes for esd protection. note: in the following context v dd5 is used for either v dda , v ddr and v ddx ; v ss5 is used for either v ssa , v ssr and v ssx unless otherwise noted. i dd5 denotes the sum of the currents flowing into the v dda , v ddx and v ddr pins. v dd is used for v dd1 , v dd2 and v ddpll , v ss is used for v ss1 , v ss2 and v sspll . i dd is used for the sum of the currents flowing into v dd1 and v dd2 . a.1.3 pins there are four groups of functional pins. a.1.3.1 5v i/o pins those i/o pins have a nominal level of 5v. this class of pins is comprised of all port i/o pins, the analog inputs, bkgd and the reset pins.the internal structure of all those pins is identical, however some of the functionality may be disabled. e.g. for the analog inputs the output drivers, pull-up and pull-down resistors are disabled permanently. a.1.3.2 analog reference this group is made up by the v rh and v rl pins. a.1.3.3 oscillator the pins xfc, extal, xtal dedicated to the oscillator have a nominal 2.5v level. they are supplied by v ddpll . a.1.3.4 test this pin is used for production testing only. a.1.3.5 v regen this pin is used to enable the on chip voltage regulator.
mc9s12a128 device guide ? v01.01 59 a.1.4 current injection power supply must maintain regulation within operating v dd5 or v dd range during instantaneous and operating maximum current conditions. if positive injection current (v in > v dd5 ) is greater than i dd5 , the injection current may flow out of v dd5 and could result in external power supply going out of regulation. ensure external v dd5 load will shunt current greater than maximum injection current. this will be the greatest risk when the mcu is not consuming power; e.g. if no system clock is present, or if clock rate is very low which would reduce overall power consumption. a.1.5 absolute maximum ratings absolute maximum ratings are stress ratings only. a functional operation under or outside those maxima is not guaranteed. stress beyond those limits may affect the reliability or cause permanent damage of the device. this device contains circuitry protecting against damage due to high static voltage or electrical fields; however, it is advised that normal precautions be taken to avoid application of any voltages higher than maximum-rated voltages to this high-impedance circuit. reliability of operation is enhanced if unused inputs are tied to an appropriate logic voltage level (e.g., either v ss5 or v dd5 ). table a-1 absolute maximum ratings (1) notes : 1. beyond absolute maximum ratings device might be damaged. num rating symbol min max unit 1 i/o, regulator and analog supply voltage v dd5 ? 0.3 6.0 v 2 digital logic supply voltage (2) 2. the device contains an internal voltage regulator to generate the logic and pll supply out of the i/o supply. the absolute maximum ratings apply when the device is powered from an external source. v dd ? 0.3 3.0 v 3 pll supply voltage 2 v ddpll ? 0.3 3.0 v 4 voltage difference v ddx to v ddr and v dda ? vddx ? 0.3 0.3 v 5 voltage difference v ssx to v ssr and v ssa ? vssx ? 0.3 0.3 v 6 digital i/o input voltage v in ? 0.3 6.0 v 7 analog reference v rh, v rl ? 0.3 6.0 v 8 xfc, extal, xtal inputs v ilv ? 0.3 3.0 v 9 test input v test ? 0.3 10.0 v 10 instantaneous maximum current single pin limit for all digital i/o pins (3) 3. all digital i/o pins are internally clamped to v ssx and v ddx , v ssr and v ddr or v ssa and v dda . i d ? 25 +25 ma 11 instantaneous maximum current single pin limit for xfc, extal, xtal (4) 4. those pins are internally clamped to v sspll and v ddpll . i dl ? 25 +25 ma 12 instantaneous maximum current single pin limit for test (5) 5. this pin is clamped low to v sspll , but not clamped high. this pin must be tied low in applications. i dt ? 0.25 0 ma 13 storage temperature range t stg ? 65 155 c
mc9s12a128 device guide ? v01.01 60 a.1.6 esd protection and latch-up immunity all esd testing is in conformity with cdf-aec-q100 stress test qualification for automotive grade integrated circuits. during the device qualification esd stresses were performed for the human body model (hbm), the machine model (mm) and the charge device model. a device will be defined as a failure if after exposure to esd pulses the device no longer meets the device specification. complete dc parametric and functional testing is performed per the applicable device specification at room temperature followed by hot temperature, unless specified otherwise in the device specification. table a-2 esd and latch-up test conditions model description symbol value unit human body series resistance r1 1500 ohm storage capacitance c 100 pf number of pulse per pin positive negative ? ? 3 3 machine series resistance r1 0 ohm storage capacitance c 200 pf number of pulse per pin positive negative ? ? 3 3 latch-up minimum input voltage limit ?? 2.5 v maximum input voltage limit ? 7.5 v table a-3 esd and latch-up protection characteristics num c rating symbol min max unit 1 c human body model (hbm) v hbm 2000 ? v 2 c machine model (mm) v mm 200 ? v 3 c charge device model (cdm) v cdm 500 ? v 4c latch-up current at t a = 125 c positive negative i lat +100 ? 100 ? ? ma 5c latch-up current at t a = 27 c positive negative i lat +200 ? 200 ? ? ma
mc9s12a128 device guide ? v01.01 61 a.1.7 operating conditions this chapter describes the operating conditions of the device. unless otherwise noted those conditions apply to all the following data. note: please refer to the temperature rating of the device (c) with regards to the ambient temperature t a and the junction temperature t j . for power dissipation calculations refer to a.1.8 power dissipation and thermal characteristics . table a-4 operating conditions rating symbol min typ max unit i/o, regulator and analog supply voltage v dd5 4.5 5 5.25 v digital logic supply voltage (1) notes : 1. the device contains an internal voltage regulator to generate the logic and pll supply out of the i/o supply. the absolute maximum ratings apply when this regulator is disabled and the device is powered from an external source. v dd 2.35 2.5 2.75 v pll supply voltage (2) v ddpll 2.25 2.5 2.75 v voltage difference v ddx to v ddr and v dda ? vddx ? 0.1 0 0.1 v voltage difference v ssx to v ssr and v ssa ? vssx ? 0.1 0 0.1 v oscillator f osc 0.5 ? 16 mhz bus frequency f bus 0.5 ? 25 mhz mc9s12a128 c operating junction temperature range t j ? 40 ? 100 c operating ambient temperature range (2) 2. please refer to a.1.8 power dissipation and thermal characteristics for more details about the relation between ambient temperature t a and device junction temperature t j . t a ? 40 27 85 c
mc9s12a128 device guide ? v01.01 62 a.1.8 power dissipation and thermal characteristics power dissipation and thermal characteristics are closely related. the user must assure that the maximum operating junction temperature is not exceeded. the average chip-junction temperature (t j ) in c can be obtained from: the total power dissipation can be calculated from: two cases with internal voltage regulator enabled and disabled must be considered: 1. internal voltage regulator disabled p io is the sum of all output currents on i/o ports associated with v ddx and v ddr . for r dson is valid: respectively t j t a p d ja ? () + = t j junction temperature, [ c ] = t a ambient temperature, [ c ] = p d total chip power dissipation, [w] = ja package thermal resistance, [ c/w] = p d p int p io + = p int chip internal power dissipation, [w] = p int i dd v dd ? i ddpll v ddpll ? i dda +v dda ? + = p io r dson i i io i 2 ? = r dson v ol i ol ------------ f o r o u t p u t s d r i v e n l o w ; = r dson v dd5 v oh ? i oh ------------------------------------ f o r o u t p u t s d r i v e n h i g h ; =
mc9s12a128 device guide ? v01.01 63 2. internal voltage regulator enabled i ddr is the current shown in table a-7 and not the overall current flowing into v ddr , which additionally contains the current flowing into the external loads with output high. p io is the sum of all output currents on i/o ports associated with v ddx and v ddr . table a-5 thermal package characteristics (1) notes : 1. the values for thermal resistance are achieved by package simulations num c rating symbol min typ max unit 1t thermal resistance lqfp112, single sided pcb (2) 2. pc board according to eia/jedec standard 51-2 ja ?? 54 o c/w 2t thermal resistance lqfp112, double sided pcb with 2 internal planes (3) 3. pc board according to eia/jedec standard 51-7 ja ?? 41 o c/w 3 t thermal resistance lqfp 80, single sided pcb ja ?? 51 o c/w 4t thermal resistance lqfp 80, double sided pcb with 2 internal planes ja ?? 41 o c/w p int i ddr v ddr ? i dda v dda ? + = p io r dson i i io i 2 ? =
mc9s12a128 device guide ? v01.01 64 a.1.9 i/o characteristics this section describes the characteristics of all 5v i/o pins. all parameters are not always applicable, e.g. not all pins feature pull up/down resistances. table a-6 5v i/o characteristics conditions are shown in table a-4 unless otherwise noted num c rating symbol min typ max unit 1 p input high voltage v ih 0.65*v dd5 ?? v t input high voltage v ih ?? v dd5 + 0.3 v 2 p input low voltage v il ?? 0.35*v dd5 v t input low voltage v il v ss5 ? 0.3 ?? v 3 c input hysteresis v hys ? 250 ? mv 4p input leakage current (pins in high impedance input mode) (1) v in = v dd5 or v ss5 notes : 1. maximum leakage current occurs at maximum operating temperature. current decreases by approximately one-half for each 8 c to 12 c in the temperature range from 50 c to 125 c. i in ? 2.5 ? 2.5 a 5p output high voltage (pins in output mode) partial drive i oh = ? 2.0ma full drive i oh = ? 10.0ma v oh v dd5 ? 0.8 ?? v 6p output low voltage (pins in output mode) partial drive i ol = +2.0ma full drive i ol = +10.0ma v ol ?? 0.8 v 7p internal pull up device current, tested at v il max. i pul ??? 130 a 8p internal pull up device current, tested at v ih min. i puh ? 10 ?? a 9p internal pull down device current, tested at v ih min. i pdh ?? 130 a 10 p internal pull down device current, tested at v il max. i pdl 10 ?? a 11 d input capacitance c in ? 6 ? pf 12 t injection current (2) single pin limit total device limit. sum of all injected currents 2. refer to a.1.4 current injection , for more details i ics i icp ? 2.5 ? 25 ? 2.5 25 ma 13 p port h, j, p interrupt input pulse filtered (3) 3. parameter only applies in stop or pseudo stop mode. t pulse ?? 3 s 14 p port h, j, p interrupt input pulse passed (3) t pulse 10 ?? s
mc9s12a128 device guide ? v01.01 65 a.1.10 supply currents this section describes the current consumption characteristics of the device as well as the conditions for the measurements. a.1.10.1 measurement conditions all measurements are without output loads. unless otherwise noted the currents are measured in single chip mode, internal voltage regulator enabled and at 25mhz bus frequency using a 4mhz oscillator in colpitts mode. production testing is performed using a square wave signal at the extal input. a.1.10.2 additional remarks in expanded modes the currents flowing in the system are highly dependent on the load at the address, data and control signals as well as on the duty cycle of those signals. no generally applicable numbers can be given. a very good estimate is to take the single chip currents and add the currents due to the external loads. table a-7 supply current characteristics conditions are shown in table a-4 unless otherwise noted num c rating symbol min typ max unit 1p run supply currents single chip, internal regulator enabled i dd5 ?? 65 ma 2p p wait supply current all modules enabled, pll on only rti enabled (1) i ddw ? ? ? ? 40 5 ma 3 c p c c p c pseudo stop current (rti and cop disabled) (1), (2) ? 40 c 27 c 70 c 85 c ? c ? temp option 100 c 105 c notes : 1. pll off 2. at those low power dissipation levels t j = t a can be assumed i ddps ? ? ? ? ? ? 370 400 450 550 600 650 500 1600 a 4 c c c c c pseudo stop current (rti and cop enabled) (1) ,(2) ? 40 c 27 c 70 c 85 c 105 c i ddps ? ? ? ? ? ? 570 600 650 750 850 ? ? ? ? ? ? a 5 c p c c p c stop current (2) ? 40 c 27 c 70 c 85 c ? c ? temp option 100 c 105 c i dds ? ? ? ? ? ? 12 25 100 130 160 200 100 1200 a
mc9s12a128 device guide ? v01.01 66 a.2 atd characteristics this section describes the characteristics of the analog to digital converter. a.2.1 atd operating characteristics the table a-8 shows conditions under which the atd operates. the following constraints exist to obtain full-scale, full range results: v ssa v rl v in v rh v dda . this constraint exists since the sample buffer amplifier can not drive beyond the power supply levels that it ties to. if the input level goes outside of this range it will effectively be clipped. a.2.2 factors influencing accuracy three factors ? source resistance, source capacitance and current injection ? have an influence on the accuracy of the atd. a.2.2.1 source resistance due to the input pin leakage current as specified in table a-6 in conjunction with the source resistance there will be a voltage drop from the signal source to the atd input. the maximum source resistance r s table a-8 atd operating characteristics conditions are shown in table a-4 unless otherwise noted num c rating symbol min typ max unit 1d reference potential low high v rl v rh v ssa v dda /2 ? ? v dda /2 v dda v v 2c differential reference voltage (1) notes : 1. full accuracy is not guaranteed when differential voltage is less than 4.50v v rh ? v rl 4.50 5.00 5.25 v 3 d atd clock frequency f atdclk 0.5 ? 2.0 mhz 4d atd 10-bit conversion period clock cycles (2) conv, time at 2.0mhz atd clock f atdclk 2. the minimum time assumes a final sample period of 2 atd clocks cycles while the maximum time assumes a final sample period of 16 atd clocks. n conv10 t conv10 14 7 ? ? 28 14 cycles s 5d atd 8-bit conversion period clock cycles (2) conv, time at 2.0mhz atd clock f atdclk n conv8 t conv8 12 6 26 13 cycles s 6d stop recovery time (v dda =5.0 volts) t sr ?? 20 s 7 p reference supply current (both atd blocks on) i ref ?? 0.750 ma 8 p reference supply current (only one atd block on) i ref ?? 0.375 ma
mc9s12a128 device guide ? v01.01 67 specifies results in an error of less than 1/2 lsb (2.5mv) at the maximum leakage current. if device or operating conditions are less than worst case or leakage-induced error is acceptable, larger values of source resistance is allowed. a.2.2.2 source capacitance when sampling an additional internal capacitor is switched to the input. this can cause a voltage drop due to charge sharing with the external and the pin capacitance. for a maximum sampling error of the input voltage 1lsb, then the external filter capacitor, c f 1024 * (c ins - c inn ). a.2.2.3 current injection there are two cases to consider. 1. a current is injected into the channel being converted. the channel being stressed has conversion values of $3ff ($ff in 8-bit mode) for analog inputs greater than v rh and $000 for values less than v rl unless the current is higher than specified as disruptive condition. 2. current is injected into pins in the neighborhood of the channel being converted. a portion of this current is picked up by the channel (coupling ratio k), this additional current impacts the accuracy of the conversion depending on the source resistance. the additional input voltage error on the converted channel can be calculated as v err = k * r s * i inj , with i inj being the sum of the currents injected into the two pins adjacent to the converted channel. table a-9 atd electrical characteristics conditions are shown in table a-4 unless otherwise noted num c rating symbol min typ max unit 1 c max input source resistance r s ?? 1k ? 2t total input capacitance non sampling sampling c inn c ins ? ? ? ? 10 22 pf 3 c disruptive analog input current i na ? 2.5 ? 2.5 ma 4 c coupling ratio positive current injection k p ?? 10 ? 4 a/a 5 c coupling ratio negative current injection k n ?? 10 ? 2 a/a
mc9s12a128 device guide ? v01.01 68 a.2.3 atd accuracy table a-10 specifies the atd conversion performance excluding any errors due to current injection, input capacitance and source resistance. for the following definitions see also figure a-1 . differential non-linearity (dnl) is defined as the difference between two adjacent switching steps. the integral non-linearity (inl) is defined as the sum of all dnls: table a-10 atd conversion performance conditions are shown in table a-4 unless otherwise noted v ref = v rh ? v rl = 5.12v. resulting to one 8 bit count = 20mv and one 10 bit count = 5mv f at dc l k = 2.0mhz num c rating symbol min typ max unit 1 p 10-bit resolution lsb ? 5 ? mv 2 p 10-bit differential nonlinearity dnl ? 1 1 counts 3 p 10-bit integral nonlinearity inl ? 2.5 1.5 2.5 counts 4p 10-bit absolute error (1) notes : 1. these values include the quantization error which is inherently 1/2 count for any a/d converter. ae ? 3 2.0 3 counts 5 p 8-bit resolution lsb ? 20 ? mv 6 p 8-bit differential nonlinearity dnl ? 0.5 ? 0.5 counts 7 p 8-bit integral nonlinearity inl ? 1.0 0.5 1.0 counts 8p 8-bit absolute error (1) ae ? 1.5 1.0 1.5 counts dnl i () v i v i1 ? ? 1lsb -------------------------- 1 ? = inl n () dnl i () i1 = n v n v 0 ? 1lsb -------------------- - n ? ==
mc9s12a128 device guide ? v01.01 69 figure a-1 atd accuracy definitions note: figure a-1 shows only definitions, for specification values refer to table a-10 . 1 5 vin mv 10 15 20 25 30 35 40 5085 5090 5095 5100 5105 5110 5115 5120 5065 5070 5075 5080 5060 0 3 2 5 4 7 6 45 $3f7 $3f9 $3f8 $3fb $3fa $3fd $3fc $3fe $3ff $3f4 $3f6 $3f5 8 9 1 2 $ff $fe $fd $3f3 10-bit resolution 8-bit resolution ideal transfer curve 10-bit transfer curve 8-bit transfer curve 5055 10-bit absolute error boundary 8-bit absolute error boundary lsb v i-1 v i dnl
mc9s12a128 device guide ? v01.01 70 a.3 nvm, flash, and eeprom note: unless otherwise noted the abbreviation nvm (non volatile memory) is used for both flash and eeprom. a.3.1 nvm timing the time base for all nvm program or erase operations is derived from the oscillator. a minimum oscillator frequency f nvmosc is required for performing program or erase operations. the nvm modules do not have any means to monitor the frequency and will not prevent program or erase operation at frequencies above or below the specified minimum. attempting to program or erase the nvm modules at a lower frequency a full program or erase transition is not assured. the flash and eeprom program and erase operations are timed using a clock derived from the oscillator using the fclkdiv and eclkdiv registers respectively. the frequency of this clock must be set within the limits specified as f nvmop . the minimum program and erase times shown in table a-11 are calculated for maximum f nvmop and maximum f bus . the maximum times are calculated for minimum f nvmop and a f bus of 2mhz. a.3.1.1 single word programming the programming time for single word programming is dependant on the bus frequency as a well as on the frequency f nvmop and can be calculated according to the following formula. a.3.1.2 burst programming this applies only to the flash where up to 32 words in a row can be programmed consecutively using burst programming by keeping the command pipeline filled. the time to program a consecutive word can be calculated as: the time to program a whole row is: burst programming is more than 2 times faster than single word programming. t swpgm 9 1 f nvmop ------------------------ - ? 25 1 f bus ----------- - ? + = t bwpgm 4 1 f nvmop ------------------------ - ? 9 1 f bus ----------- - ? + = t brpgm t swpgm 31 t bwpgm ? + =
mc9s12a128 device guide ? v01.01 71 a.3.1.3 sector erase erasing a 512 byte flash sector or a 4 byte eeprom sector takes: the setup time can be ignored for this operation. a.3.1.4 mass erase erasing a nvm block takes: the setup time can be ignored for this operation. a.3.1.5 blank check the time it takes to perform a blank check on the flash or eeprom is dependant on the location of the first non-blank word starting at relative address zero. it takes one bus cycle per word to verify plus a setup of the command. table a-11 nvm timing characteristics conditions are shown in table a-4 unless otherwise noted num c rating symbol min typ max unit 1 d external oscillator clock f nvmosc 0.5 ? 50 (1) notes : 1. restrictions for oscillator in crystal mode apply! mhz 2 d bus frequency for programming or erase operations f nvmbus 1 ? mhz 3 d operating frequency f nvmop 150 ? 200 khz 4 p single word programming time t swpgm 46 (2) 2. minimum programming times are achieved under maximum nvm operating frequency f nvmop and maximum bus frequency f bus . ? 74.5 (3) 3. maximum erase and programming times are achieved under particular combinations of f nvmop and bus frequency f bus . refer to formulae in a.3.1.1 single word programming - a.3.1.4 mass erase for guidance. s 5d flash burst programming consecutive word (4) 4. urst programming operations are not applicable to eeprom t bwpgm 20.4 (2) ? 31 (3) s 6d flash burst programming time for 32 words 4 t brpgm 678.4 (2) ? 1035.5 (3) s 7 p sector erase time t era 20 (5) 5. minimum erase times are achieved under maximum nvm operating frequency f nvmop . ? 26.7 (3) ms 8 p mass erase time t mass 100 (5) ? 133 (3) ms 9 d blank check time flash per block t check 11 (6) 6. minimum time, if first word in the array is not blank ? 32,778 (7) 7. maximum time to complete check on an erased block t cyc 10 d blank check time eeprom per block t check 11 (6) ? 2058 (7) t cyc t era 4000 1 f nvmop ------------------------ - ? t mass 20000 1 f nvmop ------------------------ - ? t check location t cyc 10 t cyc ? + ?
mc9s12a128 device guide ? v01.01 72 a.3.2 nvm reliability the reliability of the nvm blocks is guaranteed by stress test during qualification, constant process monitors and burn-in to screen early life failures. the failure rates for data retention and program/erase cycling are specified at the operating conditions noted. the program/erase cycle count on the sector is incremented every time a sector or mass erase event is executed. note: all values shown in table a-12 are target values and subject to further extensive characterization. note: flash cycling performance is 1000 cycles at ? 40 to +85 c. data retention is specified for 10 years. note: eeprom cycling performance is 10,000 cycles at ? 40 to +85 c. data retention is specified for 10 years. note: these figures are provided for commercial quality levels not automotive. table a-12 nvm reliability characteristics conditions are shown in table a-4 unless otherwise noted num c nvm array cycles data retention lifetime 1 c flash/eeprom ( ? 40 to + 85 c) 1000 10 years 2 c eeprom ( ? 40 to + 85 c) 10,000 10 years
mc9s12a128 device guide ? v01.01 73 a.4 voltage regulator the on-chip voltage regulator is intended to supply the internal logic and oscillator circuits. no external dc load is allowed. table a-13 voltage regulator recommended load capacitances rating symbol min typ max unit load capacitance on v dd1, 2 c lvdd ? 220 ? nf load capacitance on v ddpll c lvddpll ? 220 ? nf
mc9s12a128 device guide ? v01.01 74 a.5 reset, oscillator and pll this section summarizes the electrical characteristics of the various startup scenarios for oscillator and phase-locked-loop (pll). a.5.1 startup table a-14 summarizes several startup characteristics explained in this section. detailed description of the startup behavior can be found in the hcs12 clock and reset generator ( crg) block guide (motorola document order number, s12crgv3/d) . a.5.1.1 por the release level v porr and the assert level v pora are derived from the v dd supply. they are also valid if the device is powered externally. after releasing the por reset the oscillator and the clock quality check are started. if after a time t cqout no valid oscillation is detected, the mcu will start using the internal self clock. the fastest startup time possible is given by n uposc . a.5.1.2 sram data retention provided an appropriate external reset signal is applied to the mcu, preventing the cpu from executing code when v dd5 is out of specification limits, the sram contents integrity is guaranteed if after the reset the porf bit in the crg flags register has not been set. a.5.1.3 external reset when external reset is asserted for a time greater than pw rstl the crg module generates an internal reset, and the cpu starts fetching the reset vector without doing a clock quality check, if there was an oscillation before reset. table a-14 startup characteristics conditions are shown in table a-4 unless otherwise noted num c rating symbol min typ max unit 1 t por release level v porr ?? 2.07 v 2 t por assert level v pora 0.97 ?? v 3 d reset input pulse width, minimum input time pw rstl 2 ?? t osc 4 d startup from reset n rst 192 ? 196 n osc 5 d interrupt pulse width, irq edge-sensitive mode pw irq 20 ?? ns 6 d wait recovery startup time t wrs ?? 14 t cyc
mc9s12a128 device guide ? v01.01 75 a.5.1.4 stop recovery out of stop the controller can be woken up by an external interrupt. a clock quality check as after por is performed before releasing the clocks to the system. a.5.1.5 pseudo stop and wait recovery the recovery from pseudo stop and wait are essentially the same since the oscillator was not stopped in both modes. the controller can be woken up by internal or external interrupts. after t wrs the cpu starts fetching the interrupt vector. a.5.2 oscillator the device features an internal colpitts oscillator. by asserting the xclks input during reset this oscillator can be bypassed allowing the input of a square wave. before asserting the oscillator to the internal system clocks the quality of the oscillation is checked for each start from either power-on, stop or oscillator fail. t cqout specifies the maximum time before switching to the internal self clock mode after por or stop if a proper oscillation is not detected. the quality check also determines the minimum oscillator start-up time t uposc . the device also features a clock monitor. a clock monitor failure is asserted if the frequency of the incoming clock signal is below the assert frequency f cmfa. table a-15 oscillator characteristics conditions are shown in table a-4 unless otherwise noted num c rating symbol min typ max unit 1 c crystal oscillator range f osc 0.5 ? 16 mhz 2 p startup current i osc 100 ?? a 3 d oscillator start-up time from por or stop n uposc 4100 ?? cyc osc 4 c oscillator start-up time t uposc ? 8 (1) notes : 1. f osc = 4mhz, c = 22pf. 100 (2) 2. maximum value is for extreme cases using high q, low frequency crystals ms 5 d clock quality check time-out t cqout 0.45 2.5 s 6 p clock monitor failure assert frequency f cmfa 50 100 200 khz 7p external square wave input frequency (3) 3. xclks =0 during reset f ext 0.5 ? 50 mhz 8 d external square wave pulse width low t extl 9.5 ?? ns 9 d external square wave pulse width high t exth 9.5 ?? ns 10 d external square wave rise time t extr ?? 1ns 11 d external square wave fall time t extf ?? 1ns 12 d input capacitance (extal, xtal pins) c in ? 9 ? pf 13 c dc operating bias in colpitts configuration on extal pin v dcbias ? 1.1 ? v
mc9s12a128 device guide ? v01.01 76 a.5.3 phase locked loop the oscillator provides the reference clock for the pll. the pll s voltage controlled oscillator (vco) is also the system clock source in self clock mode. a.5.3.1 xfc component selection this section describes the selection of the xfc components to achieve a good filter characteristics. figure a-2 basic pll functional diagram the following procedure can be used to calculate the resistance and capacitance values using typical values for k 1 , f 1 and i ch from table a-16 . the vco gain at the desired vco output frequency is approximated by: the phase detector relationship is given by: i ch is the current in tracking mode. f osc 1 refdv+1 f ref phase detector vco k v 1 synr+1 f vco loop divider k 1 2 ? f cmp c s r c p v ddpll k v k 1 e f 1 f vco ? () k 1 1v ? --------------------------- - ? = k i ch ? k v ? =
mc9s12a128 device guide ? v01.01 77 the loop bandwidth f c should be chosen to fulfill the gardner ? s stability criteria by at least a factor of 10, typical values are 50. = 0.9 ensures a good transient response. and finally the frequency relationship is defined as with the above inputs the resistance can be calculated as: the capacitance c s can now be calculated as: the capacitance c p should be chosen in the range of: the stabilization delays shown in table a-16 are dependant on pll operational settings and external component selection (e.g. crystal, xfc filter). a.5.3.2 jitter information the basic functionality of the pll is shown in figure a-2 . with each transition of the clock f cmp , the deviation from the reference clock f ref is measured and input voltage to the vco is adjusted accordingly.the adjustment is done continuously with no abrupt changes in the clock output frequency. noise, voltage, temperature and other factors cause slight variations in the control loop resulting in a clock jitter. this jitter affects the real minimum and maximum clock periods as illustrated in figure a-3 . f c 2 f ref ?? 1 2 + + ?? ?? ? ------------------------------------------ - 1 50 ------ f c f ref 450 ? -------------- 0.9 = () ; < ? < n f vco f ref --------------- 2 s y n r 1 + () ? == r 2 nf c ??? k ----------------------------- = c s 2 2 ? f c r ?? ---------------------- 0.516 f c r ? -------------- - 0.9 = () ; = c s 20 ? c p c s 10 ? ?
mc9s12a128 device guide ? v01.01 78 figure a-3 jitter definitions the relative deviation of t nom is at its maximum for one clock period, and decreases towards zero for larger number of clock periods (n). defining the jitter as: for n < 100, the following equation is a good fit for the maximum jitter: figure a-4 maximum bus clock jitter approximation this is very important to notice with respect to timers, serial modules where a pre-scaler will eliminate the effect of the jitter to a large extent. 23 n-1n 1 0 t nom t max1 t min1 t maxn t minn jn () max 1 t max n () nt nom ? ----------------------- ? 1 t min n () nt nom ? ---------------------- - ? , ?? ?? ?? = jn () j 1 n -------- j 2 + = 1 5 10 20 n j(n)
mc9s12a128 device guide ? v01.01 79 table a-16 pll characteristics conditions are shown in table a-4 unless otherwise noted num c rating symbol min typ max unit 1 p self clock mode frequency f scm 1 ? 5.5 mhz 2 d vco locking range f vco 8 ? 50 mhz 3d lock detector transition from acquisition to tracking mode |? trk | 3 ? 4 % (1) notes : 1. % deviation from target frequency 4 d lock detection |? lock | 0 ? 1.5 % (1) 5 d un-lock detection |? unl | 0.5 ? 2.5 % (1) 6d lock detector transition from tracking to acquisition mode |? unt | 6 ? 8 % (1) 7c pllon total stabilization delay (auto mode) (2) 2. f ref = 4mhz, f bus = 25mhz equivalent f vco = 50mhz: refdv = #$03, synr = #$018, cs = 4.7nf, cp = 470pf, rs = 10k ? . t stab ? 0.5 ? ms 8d pllon acquisition mode stabilization delay (2) t acq ? 0.3 ? ms 9d pllon tracking mode stabilization delay (2) t al ? 0.2 ? ms 10 d fitting parameter vco loop gain k 1 ?? 120 ? mhz/v 11 d fitting parameter vco loop frequency f 1 ? 75 ? mhz 12 d charge pump current acquisition mode | i ch | ? 38.5 ? a 13 d charge pump current tracking mode | i ch | ? 3.5 ? a 14 c jitter fit parameter 1 (2) j 1 ?? 1.1 % 15 c jitter fit parameter 2 (2) j 2 ?? 0.13 %
mc9s12a128 device guide ? v01.01 80 a.6 spi a.6.1 master mode figure a-5 and figure a-6 illustrate the master mode timing. timing values are shown in table a-17 . figure a-5 spi master timing (cpha = 0) figure a-6 spi master timing (cpha =1) sck (output) sck (output) miso (input) mosi (output) ss 1 (output) 1 9 5 6 msb in 2 bit 6 . . . 1 lsb in msb out 2 lsb out bit 6 . . . 1 10 4 4 2 9 (cpol = 0) (cpol = 1) 3 11 12 1. if configured as output. 2. lsbf = 0. for lsbf = 1, bit order is lsb, bit 1, ..., bit 6, msb. sck (output) sck (output) miso (input) mosi (output) 1 5 6 msb in 2 bit 6 . . . 1 lsb in master msb out 2 master lsb out bit 6 . . . 1 4 4 9 11 12 10 port data (cpol = 0) (cpol = 1) port data ss 1 (output) 2 12 11 3 1. if configured as output 2. lsbf = 0. for lsbf = 1, bit order is lsb, bit 1, ..., bit 6, msb.
mc9s12a128 device guide ? v01.01 81 a.6.2 slave mode figure a-7 and figure a-8 illustrate the slave mode timing. timing values are shown in table a-18 . figure a-7 spi slave timing (cpha = 0) table a-17 spi master mode timing characteristics 1 notes : 1. the numbers 7, 8 in the column labeled ? num ? are missing. this has been done on purpose to be consistent between the master and the slave timing shown in table a-18 . conditions are shown in table a-4 unless otherwise noted, c load = 200pf on all outputs num c rating symbol min typ max unit 1 p operating frequency f op dc ? 1 / 4 f bus 1p sck period t sck = 1./f op t sck 4 ? 2048 t bus 2 d enable lead time t lead 1 / 2 ?? t sck 3 d enable lag time t lag 1 / 2 ?? t sck 4 d clock (sck) high or low time t wsck t bus ? 30 ? 1024 t bus ns 5 d data setup time (inputs) t su 25 ?? ns 6 d data hold time (inputs) t hi 0 ?? ns 9 d data valid (after enable edge) t v ?? 25 ns 10 d data hold time (outputs) t ho 0 ?? ns 11 d rise time inputs and outputs t r ?? 25 ns 12 d fall time inputs and outputs t f ?? 25 ns sck (input) sck (input) mosi (input) miso (output) ss (input) 1 9 5 6 msb in bit 6 . . . 1 lsb in msb out slave lsb out bit 6 . . . 1 10 4 4 2 7 (cpol = 0) (cpol = 1) 3 12 slave 12 11 10 11 8
mc9s12a128 device guide ? v01.01 82 figure a-8 spi slave timing (cpha =1) table a-18 spi slave mode timing characteristics conditions are shown in table a-4 unless otherwise noted, cload = 200pf on all outputs num c rating symbol min typ max unit 1 p operating frequency f op dc ? 1 / 4 f bus 1p sck period t sck = 1./f op t sck 4 ? 2048 t bus 2 d enable lead time t lead 1 ?? t cyc 3 d enable lag time t lag 1 ?? t cyc 4 d clock (sck) high or low time t wsck t cyc ? 30 ?? ns 5 d data setup time (inputs) t su 25 ?? ns 6 d data hold time (inputs) t hi 25 ?? ns 7 d slave access time t a ?? 1 t cyc 8 d slave miso disable time t dis ?? 1 t cyc 9 d data valid (after sck edge) t v ?? 25 ns 10 d data hold time (outputs) t ho 0 ?? ns 11 d rise time inputs and outputs t r ?? 25 ns 12 d fall time inputs and outputs t f ?? 25 ns sck (input) sck (input) mosi (input) miso (output) 1 5 6 msb in bit 6 . . . 1 lsb in msb out slave lsb out bit 6 . . . 1 4 4 9 11 12 10 (cpol = 0) (cpol = 1) ss (input) 2 12 11 3 slave 7 8
mc9s12a128 device guide ? v01.01 83 a.7 external bus timing a timing diagram of the external multiplexed-bus is illustrated in figure a-9 with the actual timing values shown on table table a-19 . all major bus signals are included in the diagram. while both a data write and data read cycle are shown, only one or the other would occur on a particular bus cycle. a.7.1 general muxed bus timing the expanded bus timings are highly dependent on the load conditions. the timing parameters shown assume a balanced load across all outputs.
mc9s12a128 device guide ? v01.01 84 figure a-9 general external bus timing addr/data (read) addr/data (write) addr data data 5 10 11 8 16 6 eclk 1, 2 3 4 addr data data 12 15 9 7 14 13 ecs 21 20 22 23 non-multiplexed 17 19 lstrb 29 noacc 32 ipipo0 ipipo1, pe6,5 35 18 27 28 30 33 36 31 34 r/w 24 26 25 addresses pe4 pa, pb pa, pb pk5:0 pk7 pe2 pe3 pe7
mc9s12a128 device guide ? v01.01 85 table a-19 expanded bus timing characteristics conditions are shown in table a-4 unless otherwise noted, c load = 50pf num c rating symbol min typ max unit 1 p frequency of operation (e-clock) f o 0 ? 25.0 mhz 2pcycle time t cyc 40 ?? ns 3 d pulse width, e low pw el 19 ?? ns 4d pulse width, e high (1) pw eh 19 ?? ns 5 d address delay time t ad ?? 8ns 6d address valid time to e rise (pw el ? t ad )t av 11 ?? ns 7 d muxed address hold time t mah 2 ?? ns 8 d address hold to data valid t ahds 7 ?? ns 9 d data hold to address t dha 2 ?? ns 10 d read data setup time t dsr 13 ?? ns 11 d read data hold time t dhr 0 ?? ns 12 d write data delay time t ddw ?? 7ns 13 d write data hold time t dhw 2 ?? ns 14 d write data setup time (1) (pw eh ? t ddw ) t dsw 12 ?? ns 15 d address access time (1) (t cyc ? t ad ? t dsr ) t acca 19 ?? ns 16 d e high access time (1) (pw eh ? t dsr ) t acce 6 ?? ns 17 d non-multiplexed address delay time t nad ?? 6ns 18 d non-muxed address valid to e rise (pw el ? t nad )t nav 15 ?? ns 19 d non-multiplexed address hold time t nah 2 ?? ns 20 d chip select delay time t csd ?? 16 ns 21 d chip select access time (1) (t cyc ? t csd ? t dsr ) t accs 11 ?? ns 22 d chip select hold time t csh 2 ?? ns 23 d chip select negated time t csn 8 ?? ns 24 d read/write delay time t rwd ?? 7ns 25 d read/write valid time to e rise (pw el ? t rwd )t rwv 14 ?? ns 26 d read/write hold time t rwh 2 ?? ns 27 d low strobe delay time t lsd ?? 7ns 28 d low strobe valid time to e rise (pw el ? t lsd )t lsv 14 ?? ns 29 d low strobe hold time t lsh 2 ?? ns 30 d noacc strobe delay time t nod ?? 7ns 31 d noacc valid time to e rise (pw el ? t nod )t nov 14 ?? ns
mc9s12a128 device guide ? v01.01 86 32 d noacc hold time t noh 2 ?? ns 33 d ipipo[1:0] delay time t p0d 2 ? 7ns 34 d ipipo[1:0] valid time to e rise (pw el ? t p0d )t p0v 11 ?? ns 35 d ipipo[1:0] delay time 1 (pw eh -t p1v ) t p1d 2 ? 25 ns 36 d ipipo[1:0] valid time to e fall t p1v 11 ?? ns notes : 1. affected by clock stretch: add n x t cyc where n=0,1,2 or 3, depending on the number of clock stretches. table a-19 expanded bus timing characteristics conditions are shown in table a-4 unless otherwise noted, c load = 50pf num c rating symbol min typ max unit
mc9s12a128 device guide ? v01.01 87 appendix b package information b.1 general this section provides the physical dimensions of the mc9s12a128 packages.
mc9s12a128 device guide ? v01.01 88 b.2 112-pin lqfp package figure b-1 112-pin lqfp mechanical dimensions (case no. 987) dim a min max 20.000 bsc millimeters a1 10.000 bsc b 20.000 bsc b1 10.000 bsc c --- 1.600 c1 0.050 0.150 c2 1.350 1.450 d 0.270 0.370 e 0.450 0.750 f 0.270 0.330 g 0.650 bsc j 0.090 0.170 k 0.500 ref p 0.325 bsc r1 0.100 0.200 r2 0.100 0.200 s 22.000 bsc s1 11.000 bsc v 22.000 bsc v1 11.000 bsc y 0.250 ref z 1.000 ref aa 0.090 0.160 11 11 13 7 13 view y l-m 0.20 n t 4x 4x 28 tips pin 1 ident 1 112 85 84 28 57 29 56 b v v1 b1 a1 s1 a s view ab 0.10 3 c c2 2 0.050 seating plane gage plane 1 view ab c1 (z) (y) e (k) r2 r1 0.25 j1 view y j1 p g 108x 4x section j1-j1 base rotated 90 counterclockwise metal j aa f d l-m m 0.13 n t 1 2 3 c l l-m 0.20 n t l n m t t 112x x x=l, m or n r r notes: 1. dimensioning and tolerancing per asme y14.5m, 1994. 2. dimensions in millimeters. 3. datums l, m and n to be determined at seating plane, datum t. 4. dimensions s and v to be determined at seating plane, datum t. 5. dimensions a and b do not include mold protrusion. allowable protrusion is 0.25 per side. dimensions a and b include mold mismatch. 6. dimension d does not include dambar protrusion. allowable dambar protrusion shall not cause the d dimension to exceed 0.46. 8 3 0
mc9s12a128 device guide ? v01.01 89 b.3 80-pin qfp package figure b-2 80-pin qfp mechanical dimensions (case no. 841b) notes: 1. dimensioning and tolerancing per ansi y14.5m, 1982. 2. controlling dimension: millimeter. 3. datum plane -h- is located at bottom of lead and is coincident with the lead where the lead exits the plastic body at the bottom of the parting line. 4. datums -a-, -b- and -d- to be determined at datum plane -h-. 5. dimensions s and v to be determined at seating plane -c-. 6. dimensions a and b do not include mold protrusion. allowable protrusion is 0.25 per side. dimensions a and b do include mold mismatch and are determined at datum plane -h-. 7. dimension d does not include dambar protrusion. allowable dambar protrusion shall be 0.08 total in excess of the d dimension at maximum material condition. dambar cannot be located on the lower radius or the foot. section b-b 61 60 detail a l 41 40 80 -a- l -d- a s a-b m 0.20 d s h 0.05 a-b s 120 21 -b- b v j f n d view rotated 90 detail a b b p -a-,-b-,-d- e h g m m detail c seating plane -c- c datum plane 0.10 -h- datum plane -h- u t r q k w x detail c dim min max millimeters a 13.90 14.10 b 13.90 14.10 c 2.15 2.45 d 0.22 0.38 e 2.00 2.40 f 0.22 0.33 g 0.65 bsc h --- 0.25 j 0.13 0.23 k 0.65 0.95 l 12.35 ref m 5 10 n 0.13 0.17 p 0.325 bsc q 0 7 r 0.13 0.30 s 16.95 17.45 t 0.13 --- u 0 --- v 16.95 17.45 w 0.35 0.45 x 1.6 ref s a-b m 0.20 d s c s a-b m 0.20 d s h 0.05 d s a-b m 0.20 d s c s a-b m 0.20 d s c
mc9s12a128 device guide ? v01.01 90
mc9s12a128 device guide ? v01.01 91 user guide end sheet
mc9s12a128 device guide ? v01.01 92 final page of 92 pages


▲Up To Search▲   

 
Price & Availability of 9S12A128DGV1

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X